It's not a secret anymore!*
The moose likes XML and Related Technologies and the fly likes Rendering XML in browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Rendering XML in browser" Watch "Rendering XML in browser" New topic
Author

Rendering XML in browser

neetu shri
Greenhorn

Joined: Aug 14, 2007
Posts: 17
Hi,
If I want to render content from multiple xml files in browser, what technologies can I use? I wuld like to see the content in a report/table format when rendered in browser.

The environment currently has Active Perl available. But I can install other software if needed.

I wuld like to know the possiblities so I can do some learning/research in the right direction.
Can someone point me to possible solutions?
Thank you


SCJP 1.2<br />SCWCD
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Hi Neetu,

Do you really need new softwares for this ?

I mean, if all you need is to represent an xml file contents in a table/report, can't we just make use of Javascript to parse the
xml at browser level and display it as a table, at runtime ? Thats what the traditional Ajax approach was all about, right?

Dawn.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You can transform XML to HTML (tables or whatever you like) using XSLT. You could do this on the server using an XSL transformer, or you could have the browser do it by inserting a suitable processing instruction at the beginning of the XML.
neetu shri
Greenhorn

Joined: Aug 14, 2007
Posts: 17
I have used XSLT as processing instruction in an xml file. But if I have say f1.xml, f2.xml ...fn.xml and want to get data from all these files to display in a table format ---how do i do that? using xslt, i could do it with a single xml file.
thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You might want to look into the document() function.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rendering XML in browser