C
Cathy
Hi,
I am new to XML. I have a questions regarding DOM.
<root>
<demo demoatt="testattr">This is PCDATA</domo>
</root>
The book I read presents 2 ways to get This is PCDATA
(1) selectsinglenode("/root/demo").nodevalue
(2) selectsinglenode("/root/demo[0]").firstchild.nodevalue
Why do I need to use firstchild in the 2nd method? Thanks.
I am new to XML. I have a questions regarding DOM.
<root>
<demo demoatt="testattr">This is PCDATA</domo>
</root>
The book I read presents 2 ways to get This is PCDATA
(1) selectsinglenode("/root/demo").nodevalue
(2) selectsinglenode("/root/demo[0]").firstchild.nodevalue
Why do I need to use firstchild in the 2nd method? Thanks.