9 Replies Latest reply on Jun 8, 2009 8:17 AM by BennyBeta

    Hierarchical XML Question

    christophsk Level 1

      I have XML that looks like this:


      <DatabaseList name="myDB">

        <Directory name="database" path="D:\database">

          <Directory name="Nick" path="D:\Nick">

            <Database name="New" path="D:\New"/>

            <Database name="Old" path="D:\Old"/>

            <Database name="Blue" path="D:\Blue"/>


          <Directory name="tmp" path="D:\tmp"/>

          <Database name="News" path="D:\News/>

          <Database name="Example" path="D:\Example/>

          <Database name="Set" path="D:\Set/>




      What I want to do is traverse this so as to present this in a

      hierarchical tree structure that has only the Directory elements.


      Anything with 'Database' needs to be eliminated. Imagine all

      the <Database> stuff gone. Of course, each element has

      many attributes but that doesn't matter.


      I think I've exhausted everything with no good answer. The

      replace() doesn't seem to fit the bill.


      Any ideas out there? Thanks in advance.