aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to read xml or xsl from jar file 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 "How to read xml or xsl from jar file" Watch "How to read xml or xsl from jar file" New topic
Author

How to read xml or xsl from jar file

Amar, Nandigam
Greenhorn

Joined: Mar 21, 2001
Posts: 8
Hi all,
I would like to know whether it is possible to read an xml and xsl file that are within a jar file? If possible, how?
thanks,
amar.
Vlad Patryshev
Ranch Hand

Joined: Jun 30, 2001
Posts: 61
We are talking about java, right? Then the following will help:

[This message has been edited by Vlad Patryshev (edited July 03, 2001).]


Thanks,<br />Vlad
Amar, Nandigam
Greenhorn

Joined: Mar 21, 2001
Posts: 8
Hi Vlad,
thanks for your reply. I have one more question. If my xml file is in a jar file which itself is in another jar file, how do I access it. For example I have to read an xml file from war file which is in a ear file. Can I convert JarEntry of war file into a JarFile and acess xml file from it? I was looking at API of JarFile, I couldn't see a constructor which takes JarEntry. Is this possible?
thanks,
amar.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to read xml or xsl from jar file