jimeh
August 30th, 2001, 05:18 AM
Sorry if anyone feels I'm posting in the wrong forum, but this question did not really fit in in the VC++ forum either.
My problem is that I can't get the insertBefore method to work when adding new elements/nodes to my xml document.
This is my xml document:
<?xml version="1.0" encoding="ISO-8859-1"?>
<names>
<name name="Flanders, Ned"/>
<name name="Gumble, Barney"/>
<name name="Skinner, Seymour"/>
</names>
Now I would like to do a insert with a new name "Simpson, Homer" so that it is placed before "Skinner, Seymour".
According to the MSDN specification the insertBefore method takes two arguments: newChild and refChild. But what confuses me is that refChild is supposed to be a variant, and not just a node pointer. I've tried different approaches but I've only managed to insert the new name at the end of the list.
Does anyone have some code samples using insertBefore in VC++? I would be very grateful. I've been looking for examples everywhere but found none that helps me.
Thanks!
My problem is that I can't get the insertBefore method to work when adding new elements/nodes to my xml document.
This is my xml document:
<?xml version="1.0" encoding="ISO-8859-1"?>
<names>
<name name="Flanders, Ned"/>
<name name="Gumble, Barney"/>
<name name="Skinner, Seymour"/>
</names>
Now I would like to do a insert with a new name "Simpson, Homer" so that it is placed before "Skinner, Seymour".
According to the MSDN specification the insertBefore method takes two arguments: newChild and refChild. But what confuses me is that refChild is supposed to be a variant, and not just a node pointer. I've tried different approaches but I've only managed to insert the new name at the end of the list.
Does anyone have some code samples using insertBefore in VC++? I would be very grateful. I've been looking for examples everywhere but found none that helps me.
Thanks!