It's not a secret anymore!
The moose likes JSP and the fly likes Viewing xml data in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Viewing xml data in jsp" Watch "Viewing xml data in jsp" New topic
Author

Viewing xml data in jsp

Latif Khan
Greenhorn

Joined: Feb 08, 2012
Posts: 19
How do i view an xml data in jsp.
ex:
+root
-sub
-sub
-sub
-sub
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 88

you will need to replace the special characters from the XML before you can actually show it in jsp. e.g. replacing "<" and ">" with "<" , ">" etc.
Latif Khan
Greenhorn

Joined: Feb 08, 2012
Posts: 19
it is displaying
<root>
<sub>value</sub>
<sub>value</sub>
<sub>value</sub>
</root>

i want to display as

+root
value(if i click on + )
value(if i click on + )
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 1275
    
    7

So you want to display it as a tree?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

Before writing any JSP code, figure out what HTML code will display the data as you intend. Then, and only then, write the JSP markup (remember, no Java code in a JSP!) to generate that HTML.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Viewing xml data in jsp
 
Similar Threads
hide xml data
XML & JSP Technology
Traverse DOS/UNIX diretories - print members
Passing multiple XML objects using curl
Configuring JMS destinations and Data sources