Is this a valid post, or is this being re-sent by the mail server?

Adam



                                                                                       
                       
                    Pascal                                                             
                       
                    Troxler              To:     JRun-Talk 
<[EMAIL PROTECTED]>                      
                    <admin@trosof        cc:                                           
                       
                    t.ch>                Subject:     Re: file path                    
                       
                                                                                       
                       
                    11/30/00                                                           
                       
                    03:22 AM                                                           
                       
                    Please                                                             
                       
                    respond to                                                         
                       
                    jrun-talk                                                          
                       
                                                                                       
                       
                                                                                       
                       





>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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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