| Author |
collapse tree view using xsl
|
kesava chaitanya
Ranch Hand
Joined: Aug 15, 2001
Posts: 140
|
|
my xml file is like this <WORLD> <COUNTRY COUNTRYID="INDIA"> <STATE STATEID="ANDHRAPRADESH"> <CITY>HYDERABAD</CITY> <CITY>VIZAG</CITY> <CITY>KURNOOL</CITY> </STATE> <STATE STATEID="TAMILNADU"> <CITY>CHENNAI</CITY> <CITY>COIMBATORE</CITY> <CITY>SALEM</CITY> </STATE> <STATE STATEID="KARNATAKA"> <CITY>BANGALORE</CITY> <CITY>MYSORE</CITY> <CITY>BALLARI</CITY> </STATE> </COUNTRY> <COUNTRY COUNTRYID="AUSTRALIA"> <STATE STATEID="NEW SOUTH WALES"> <CITY>PERTH</CITY> <CITY>BRIABANE</CITY> <CITY>HOBART</CITY> </STATE> </COUNTRY> </WORLD> i want to display expandable/collapse tree structure using xsl;like world india andhrapradesh hyderabad vizag karnataka bangalore australia does anybody provide some code or links to achieve this ; bye chaitanya
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
|
Bypassing "whatever" you mean by expandable, this should be a very simple transformation. I recommend that you check out zvon.org's website for a tutorial and reference on XSLT. If you were looking for code from somebody on here, I'd give up on that -- it'll be a long wait.
|
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
|
 |
kesava chaitanya
Ranch Hand
Joined: Aug 15, 2001
Posts: 140
|
|
hi i know little bit xsl;but i want to display hierarchical tree using xsl;
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
|
Well, I would recommend learning a little bit more xslt, and then using it.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
It would also help if you could define "expandable" for us?
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
kesava chaitanya
Ranch Hand
Joined: Aug 15, 2001
Posts: 140
|
|
|
expandable means i hierarchical tree view with + ,- signs;
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
And you want it to show up on a web page, right? Then the first thing you should do is to write the necessary HTML+JavaScript for doing this. Then, you can develop an XSL stylesheet which transforms your XML into the HTML+JavaScript doing the expand/collapse thing.
|
 |
 |
|
|
subject: collapse tree view using xsl
|
|
|