Link to home
Start Free TrialLog in
Avatar of data-nova
data-nova

asked on

Expand\Collapse all nodes

Can anyone give me an example about how I can make an XML file (displayed in a browser) that has a Collapse\Expand all option ?
Maybe it needs some javascript .Thank you
Avatar of data-nova
data-nova

ASKER

for example i have this file

 <Customerlist>
<Customer no="100" name="John Smith" country="Italy">
     <SalesInfo>        
      <Sale saleid="501" date="2006-03-02" amount="10.00"></Sale>
        <Sale saleid="675" date="2006-03-11" amount="42.00"></Sale>
     </SalesInfo>        
     <Otherinfo CustomerCategory="AA" Zone="4"/>
</Customer>
<Customer no="200" name="Davy Jackson" country="France">
     <SalesInfo>        
      <Sale saleid="324" date="2006-02-22" amount="12.00"></Sale>
        <Sale saleid="700" date="2006-03-11" amount="56.00"></Sale>
     </SalesInfo>        
     <Otherinfo CustomerCategory="BB" Zone="3"/>
</Customer>
</Customerlist>


 how can i display it so that i only see like this with the nodes collapsed
- <Customerlist>
+ <Customer no="100" name="John Smith" country="Italy">
+ <Customer no="200" name="Davy Jackson" country="France">
  </Customerlist>
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

 i could use XSL.i dont need to have just the XML file
 I have seen it work in some places
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

 well that displays all the nodes open , i want all of them displayed collapsed
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial