Hi,
In my application i may need to add/insert attributes in a xml_tree.
Eg: If the doc looks like

  <person>
    <name>Dave</name>
    <age>20</age>
    <Sex>Male</Sex>
  </person>

  But would like to add an attribute: serialid

  <person>
    <name serialid="02">Dave</name>
    <age>20</age>
    <Sex>Male</Sex>
  </person>


I therefore use the xpath with /person/name/@serialid to traverse the tree.

But when i use
xObj = contextXPath->execute(......)
i get a null, which is true because this attribute does not exist as of now.

But is there any way i could get a reference to the node <name> so that i 
can use setAttribute and set this new attribute.

Any help would be appreciated.

regards,
Mohammed Zubair.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Reply via email to