aspose file tools*
The moose likes XML and Related Technologies and the fly likes XSLT or Java API? 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 "XSLT or Java API?" Watch "XSLT or Java API?" New topic
Author

XSLT or Java API?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Hi,

I have a situation where I need to modify an XML file depending on the content of another XML file.

Looks like XSLT is perfect for this situation but my problem is that I am not very comfortable with XSLT. If I do this with some Java API then I'll have more control over the processing, I guess - i.e. reading something from properties file etc.

What do you suggest?

Thanks.


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42641
    
  65
XSLT is meant to apply a transformation to an XML file. I don't know that it is well suited for a problem that involves two XML input files.

I think I'd use an XML API (like DOM, XOM, etc.) for the file that is to be modified, and drive the process while reading the other XML file using SAX (or XPath, or whatever is appropriate for the problem).


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: XSLT or Java API?