Group:  General ยป microsoft.public.office.xml
Thread: Can I Rely on 'Is' Operator for Comparing XMLNode Objects?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Can I Rely on 'Is' Operator for Comparing XMLNode Objects?
"Ignoramus" <oleg.krupnov[ at ]gmail.com> 08.06.2006 05:20:10
Hi,

In my VBA code, I create a Dictionary object where keys are XMLNode
objects of the document and values are objects of my other class.
First, I fill this dictionary with all XML nodes present in the
document, and then I want to identify my corresponding objects by the
currently selected XML node.

However I've found that when I access the XML node via a Range object,
say Selection.XMLParent, the XML node is not found in the dictionary!
(the Is operator, which is used for key identification, fails!)

It looks like Word maintains its internal representation of the XML
structure of the docment and creates the XMLNode objects as just
volatile views of that structure (the same thing as for Range objects).

If this is the case, how do I compare and identify XML node objects for
my purpose? Comparing XML source is too costy.

Thanks

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net