This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The browser will display the XML document as is. If you need to extract parts of the document and format them in a different order you will need to use XSL. Infact the browser uses a dummy XSL that simply traverses all the nodes and prints the contents. The capability of a browser to display an XML document should not be considered as an alternative to using XSLs. For example, a browser is of no use if you have to generate the formatted XML, say in the pdf format or MSWord format on the server! HTH ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Hi Audi, Do you mean to parse the xml document with parser? and using DOM/SAX to traverse through them? I am not sure if I am right in saying this..
Joined: May 21, 2001
in fact, i generate, xml thru java and i would like to display it in a pretty look in my browser, i know i can do that with xsl, but i've heard i can do so without it directly thru java (what i feel incredible, that's why i ask if that's true)
Joined: Mar 17, 2000
Yes, you can use "on-the-fly" transformation using any standard XSLT engine. For example, checkout the XALAN API form Apache. Using the Transformer class and a stylesheet, you can easily generate the output (HTML/TXT/any other format) file. HTH ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.