0 Replies Latest reply on Apr 18, 2007 7:33 PM by JingZhe SHAN

    Tree structure problem

    JingZhe SHAN Level 1
      Hello All:

      This is the raw XML file that I use as the tree's dataProvider, as you can observe within this XML's structure there are some unnecessary tags included, like
      <groups>, <roles>, <apps>

      <getUserInfoResponse xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
      <user name="user1" id="1">
      <groups>
      <group name="group1" id="1">
      <roles>
      <role name="role1" id="1">
      <apps>
      <app name="app1" id="1"/>
      </apps>
      </role>
      <role name="role2" id="2">
      <apps>
      <app name="app3" id="3"/>
      <app name="app1" id="1"/>
      <app name="app2" id="2"/>
      </apps>
      </role>
      </roles>
      </group>
      <group name="group2" id="2">
      <roles>
      <role name="role4" id="4">
      <apps>
      <app name="app4" id="4"/>
      </apps>
      </role>
      <role name="role3" id="3">
      <apps>
      <app name="app1" id="1"/>
      </apps>
      </role>
      </roles>
      </group>
      </groups>
      </user>
      </getUserInfoResponse>

      How can I reformat it to:

      <getUserInfoResponse xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
      <user name="user1" id="1">
      <group name="group1" id="1">
      <role name="role1" id="1">
      <app name="app1" id="1"/>
      </role>
      <role name="role2" id="2">
      <app name="app3" id="3"/>
      <app name="app1" id="1"/>
      <app name="app2" id="2"/>
      </role>
      </group>
      <group name="group2" id="2">
      <role name="role4" id="4">
      <app name="app4" id="4"/>
      </role>
      <role name="role3" id="3">
      <app name="app1" id="1"/>
      </role>
      </group>
      </user>
      </getUserInfoResponse>

      Who can help me figure it out?
      Thanks