Determine if Nodes are the Same - VC++ MSXML DOM 6 RRS feed

  • Question

  • I have a situation where I need to uniquely identify MSXML DOM nodes (IXMLDOMNode) to use as keys in a container, even if they come from different function calls (such as different xpaths that yield the same node). It would be alright for it to be unique pointers, IDs, or even paths; as long as it is unique for every node and always the same no matter how the node was obtained.

    It appears that every call to a function like selectNodes creates a IXMLDOMNode wrapper around the actual object. I examined the data in the debugger and saw that IXMLDOMNode objects representing node have the same _pNode pointer in them, but the IXMLDOMNode objects themselves are different. However, there seems to be no way to get at the underlying object or determine that those underlying objects are the same.

    Any suggestions would be appreciated.

    Tuesday, October 29, 2019 7:12 PM

All replies