Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Expand\Collapse all nodes

Posted on 2006-03-31
8
Medium Priority
?
2,530 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:data-nova
6 Comments
 

Author Comment

by:data-nova
ID: 16343622
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
 
LVL 35

Accepted Solution

by:
TimYates earned 672 total points
ID: 16343716
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
 

Author Comment

by:data-nova
ID: 16346104

 i could use XSL.i dont need to have just the XML file
 I have seen it work in some places
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Assisted Solution

by:YZlat
YZlat earned 664 total points
ID: 16346732
create a file, save it with .xml extension and open it with Internet Explorer
0
 

Author Comment

by:data-nova
ID: 16349196

 well that displays all the nodes open , i want all of them displayed collapsed
0
 
LVL 6

Assisted Solution

by:avinthm
avinthm earned 664 total points
ID: 16378231
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question