Environment versions
Network:
Windows 2003 Server
>>Well, you certainly shouldn't have to clone (assuming the XmlDocument and the NameSpaceManager do not change - but since the method references objects which are external it's a bit difficult to know what else might be going on.
>
>oXmlDocument is initialized at one location. Then, I can use use at several locations. This is one method. I use it to select a single node. This goes in oXmlNode. Then, from oXmlNode, I would like to collect all attributes. This works well on the first run. But, without cloning, on the second run, something was mixing in memory.
>
>oXmlAttributeCollection is only initialized here but it is not used so far. However, the RemoveAll() method might not have been best to initialize it. Maybe as mentioned in the other message I should have used an approach to set it to nothing.
Then, as Gregory points out:
First time through you use oXmlAttributeCollection to reference the attributes of the node in question. Since oXmlAttributeCollection is defined externally it is still in scope when the routine is called for the second time for the same node so all the attributes are removed - thus you won't find any.....
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only