>How are you accessing the XML file?
>Are you using ClassLoader.getResourceAsStream( "filename" )?
>Need some more information before I can give you a hand.
>Adam


The code is like this:


import org.xml.sax.*;
import org.w3c.dom.*;
import org.apache.xerces.parsers.DOMParser;
....

public void parse ( ) {

     DOMParser parser = new  DOMParser();

     try {
         parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", 
false);
         
parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", 
true);
         parser.setFeature("http://apache.org/xml/features/allow-java-encodings", 
true);

         parser.parse ( "myxmlfile.xml" );
         Document document = parser.getDocument();
         NodeList list = document.getChildNodes();
         .....
     } catch (Exception e) {
        ....
     }

*******

The Object "document" always gets NULL. So it seems he could not find the file.
The Parser Object accepts a String or an InputSource Object as Parameter.
The InputSource constructor accepts a String or an InputStream.

Where is the jrun VM searching for the "myxmlfile.xml" ?


>Pascal Troxler
>University of Applied Sciences
>Biel, Switzerland



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to