Hello Highlly Tinker Guys,


I want XPath of Each Node in XMlFile in Vb.net

Below Is my Code on button click event

Dim szXMLDoc As XmlDocument=New XmlDocument()
 szXMLDoc.Load(Server.MapPath("ChurchFolders.xml"))
 
'------Code to find xpath for each node-----------

The ChurchFolers.xml file is As below

<xml version="1.0">
  <folder id="parent" path="~/MyChurch">
    <folder id="document" path="/Documents"></folder>
    <folder id="slide" path="/Slides"></folder>
    <folder id="media" path="/Medias">
      <folder id="sermon" path="/Sermon"/>
    </folder>
    <folder id="image" path="/Images">
      <folder id="menu" path="/Menu"></folder>
      <folder id="member" path="/Member"></folder>
      <folder id="resource" path="/Resource"></folder>
      <folder id="family" path="/Family">
        <folder id="familymember" path="/FamilyMember"></folder>        
      </folder>      
    </folder>
  </folder>
</xml>

Acually My AIM is ::
All path element is Directoryname in server. and want to create dynamic path to store images/file/data...
so for Element ID ="famliyMember" ,I am trying to get wholepath like "~/MyChurch/Images/Family/FamilyMember".

Please....Guide....Wait For your single suggestion

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.