C
chris yoker
hiya,
I succesfully return a "nodeList" thru the "xmlDoc.SelectNodes" method.
This nodeList is taken from a repetitive, uniform xml doc.
I can successfully append a child node at the correct position using the
following code:
<code>
<!--Node inserted into corrrect position in nodeList(0)-->
nodeList(0).InsertAfter(additionalNode, nodeList(0).ChildNodes(5))
</code>
however, as soon as I try to do the same with nodeList(1), then
apparently the SAME code that previously inserted the node into
nodeList(0) doesn't do its job.
<code>
<!--Node NOT inserted into nodeList(0)-->
nodeList(0).InsertAfter(additionalNode, nodeList(0).ChildNodes(5))
<!--Node inserted into corrrect position in nodeList(1)-->
nodeList(1).InsertAfter(additionalNode, nodeList(1).ChildNodes(5))
</code>
Surely, If i am using the "InsertAfter" method, then the node should
have been inserted BOTH times?
As a test, I swapped my code round, and I can confirm that the node is
ONLY inserted on the 2nd call.
<code>
<!--Node NOT inserted into nodeList(1)-->
nodeList(1).InsertAfter(additionalNode, nodeList(1).ChildNodes(5))
<!--Node inserted into corrrect position in nodeList(0)-->
nodeList(0).InsertAfter(additionalNode, nodeList(0).ChildNodes(5))
</code>
Can someone comment?I have been spent a bit of time on this, and am no
further forward.
Even if i could get hold of some sample code in vb / c# that did this,
then I'm sure I could take it from there ;-)
ta,
yogiberr
I succesfully return a "nodeList" thru the "xmlDoc.SelectNodes" method.
This nodeList is taken from a repetitive, uniform xml doc.
I can successfully append a child node at the correct position using the
following code:
<code>
<!--Node inserted into corrrect position in nodeList(0)-->
nodeList(0).InsertAfter(additionalNode, nodeList(0).ChildNodes(5))
</code>
however, as soon as I try to do the same with nodeList(1), then
apparently the SAME code that previously inserted the node into
nodeList(0) doesn't do its job.
<code>
<!--Node NOT inserted into nodeList(0)-->
nodeList(0).InsertAfter(additionalNode, nodeList(0).ChildNodes(5))
<!--Node inserted into corrrect position in nodeList(1)-->
nodeList(1).InsertAfter(additionalNode, nodeList(1).ChildNodes(5))
</code>
Surely, If i am using the "InsertAfter" method, then the node should
have been inserted BOTH times?
As a test, I swapped my code round, and I can confirm that the node is
ONLY inserted on the 2nd call.
<code>
<!--Node NOT inserted into nodeList(1)-->
nodeList(1).InsertAfter(additionalNode, nodeList(1).ChildNodes(5))
<!--Node inserted into corrrect position in nodeList(0)-->
nodeList(0).InsertAfter(additionalNode, nodeList(0).ChildNodes(5))
</code>
Can someone comment?I have been spent a bit of time on this, and am no
further forward.
Even if i could get hold of some sample code in vb / c# that did this,
then I'm sure I could take it from there ;-)
ta,
yogiberr