aspose file tools*
The moose likes XML and Related Technologies and the fly likes writing a xml with different schema from xml with different schema using DOM 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 "writing a xml with different schema from xml with different schema using DOM" Watch "writing a xml with different schema from xml with different schema using DOM" New topic
Author

writing a xml with different schema from xml with different schema using DOM

Bharath Raja
Ranch Hand

Joined: Jan 21, 2009
Posts: 111
I've a xml file as follow.


Now I wanna to generate another xml file with different schema from this xml file using DOM parser. Expecting xml file schema is


Is there any option to do this with DOM parser.? I'm new to xml related technologies, so never mind if I've ask any silly questions


Life is either daring something or nothing - Helen Keller
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

The usual way to transform one XML document into another XML document is to use an XSL transformation.
Bharath Raja
Ranch Hand

Joined: Jan 21, 2009
Posts: 111
Paul Clapham wrote:The usual way to transform one XML document into another XML document is to use an XSL transformation.

can you please elaborate. If that is possible, how can we achieve, any url's ..?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Try this one: Jeni's XSLT Pages.
Bharath Raja
Ranch Hand

Joined: Jan 21, 2009
Posts: 111
Thanks for the url. But still I'm not clearing about how can we achieve this through Java.? I've a xml file only how can I convert/embedded it with xsl through java.?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: writing a xml with different schema from xml with different schema using DOM