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
data-novaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

data-novaAuthor Commented:
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>
0
TimYatesCommented:
Errr...  I don't think you can...

That's just how the browser displays it

You can't embed javascript in an XML file...

Tim
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
data-novaAuthor Commented:

 i could use XSL.i dont need to have just the XML file
 I have seen it work in some places
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

YZlatCommented:
create a file, save it with .xml extension and open it with Internet Explorer
0
data-novaAuthor Commented:

 well that displays all the nodes open , i want all of them displayed collapsed
0
avinthmCommented:
you will be provided with + and - sign to the left of the tags.
you can use them to expand or collapse the xml file.

you can use xml editors.
http://www.stylusstudio.com/xml_download.html
http://www.altova.com/download.html

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.