I am using the XmlDocument Select Nodes method and it seems to work OK
except that it returns embedded nodes in the collection when I only want the
nodes that are not embedded. For example I have a statement as follows:
nodes = doc.SelectNodes(\\Node1\\Node\\DesiredNode);
It gives me back in the collection all the DesiredNode tags. If I select
retrieve the nth node as follows
node = nodes[n-1];
It gives me the correct node and all DesiredNodes that are embedded within
the nth node. So if I ask for the first node it gives me the first node
which includes about 5 embedded DesiredNodes. When I ask for the second
DesiredNode node it gives me the first embedded node within the first
DesiredNode. I would like to retrieve a DesireNode nodes collection which
only retrieves nodes which are not embedded. Embedded DesiredNodes cannot
be retrieved directly and can only be seen as embedded within the
non-embedded nodes. How do I do that? I can't seem to find that in the
XPath or XmlDoocument documentation. Please advise. Thanks for your help.
Best Regards,
Paul J. Lay