Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Obtain Full Path of XML Node

From: connah@-----.---
To: NULL
Date: 4/4/2006 9:07:00 AM

Hi All!

How can I obtain the full XML path of any given XML Node? For example,
if my XML document looks like this:

---BEGIN XML DOC---
<Tag1>
   <Tag2>
      <Tag3></Tag3>
   </Tag2>
</Tag1>
---END XML DOC---

And my code looks like this:

---BEGIN VB6 CODE---
    Dim objCustNode As MSXML2.IXMLDOMNode
    Dim objCustNodeList As MSXML2.IXMLDOMNodeList

    objCustXML.Load("myFile.xml")
    Set objCustNodeList = objCustXML.selectNodes("//*")
    For Each objCustNode In objCustNodeList
        Debug.Print objCustNode.nodeName
    Next
---END VB6 CODE---

At the point in the For Next loop where objCustNode.nodeName is equal
to "Tag3", I want to know what's it's FULL path is, ie,
"//Tag1/Tag2/Tag3".

How can I do this? Thank you!



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent