find XML file from archive

Hi,I have one xml file that is packaged in an EAR file and deployed to Websphere.I have to read the contents of the xml file.How can I do that?
[171 byte] By [suunknowna] at [2007-11-26 20:38:29]
# 1
How can you do what?Your title says something about finding an XML file but the body of your post suggests you want to know how to read it. A more precise question would help.
DrClapa at 2007-7-10 1:55:21 > top of Java-index,Java Essentials,Java Programming...
# 2

I have some XML files that are packaged in a EAR file and deployed to Websphere AppServer.

Ex: WEB-INF/classes/XMLDir/test.xml

I have to find the location of these files ( relative to Webspere classes dir ) and Parse through these files.

The below code is not finding xml files (returning NULL ) and throwing Exception.

String xmlFile = "XMLDir/test.xml";

InputStream input = this.getClass().getResourceAsStream(xmlFile);

How can I find these xml files, so that I can parse through these files.

suunknowna at 2007-7-10 1:55:21 > top of Java-index,Java Essentials,Java Programming...
# 3
Try this instead:String xmlFile = "/XMLDir/test.xml";The slash at the front tells the method not to treat the name as relative to the name of your class.
DrClapa at 2007-7-10 1:55:21 > top of Java-index,Java Essentials,Java Programming...