[jdom-interest] unsubscribe

Tim Kelly tkelly at webhire.com
Mon Feb 5 07:29:51 PST 2001


                                                                                                       
                    jdom-interest-reques                                                               
                    t at jdom.org                  To:     jdom-interest at jdom.org                         
                    Sent by:                    cc:                                                    
                    jdom-interest-admin@        Subject:     jdom-interest digest, Vol 1 #448 - 1 msg  
                    jdom.org                                                                           
                                                                                                       
                                                                                                       
                    02/05/2001 02:08 AM                                                                
                    Please respond to                                                                  
                    jdom-interest                                                                      
                                                                                                       
                                                                                                       








Send jdom-interest mailing list submissions to
     jdom-interest at jdom.org

To subscribe or unsubscribe via the World Wide Web, visit

http://lists.denveronline.net/mailman/listinfo/jdom-interest
or, via email, send a message with subject or body 'help' to
     jdom-interest-request at jdom.org

You can reach the person managing the list at
     jdom-interest-admin at jdom.org

When replying, please edit your Subject line so it is more
specific
than "Re: Contents of jdom-interest digest..."


Today's Topics:

   1. DTD-System ID read in even in non-validation mode?
(Niko Schmuck)

--__--__--

Message: 1
From: Niko Schmuck <niko at nava.de>
Date: Sun, 4 Feb 2001 20:22:35 +0100
To: jdom-interest at jdom.org
Subject: [jdom-interest] DTD-System ID read in even in
non-validation mode?

hi JDOM-users,

i want to use the same XML document instance in an online
and an offline
environment with the help of JDOM (which is really great to
use). The problem
is, if there is no network connection the System Identifier
specified in the
doctype declaration cannot be resolved - even if i set
validation off.
I thought this should be running because in no-validation
parsing there is
no need for accessing the DTD. Please can someone tell me if
i am wrong with
this assumption and what would be a solution?

Thanks in advance,
Niko


----%<----%<----%<----%<----%<----%<----%<----%<----%<----%
<----%<----%<----
The java code fragment which starts the JDOM processing:
--

    // Specify which SAX Parser to use
    saxDriverClass = "org.apache.xerces.parsers.SAXParser";

    // document reading without validation
    SAXBuilder builder = new SAXBuilder(saxDriverClass,
false);

    // Build the JDOM from Document
    Document doc = builder.build(new File(filename)); 
----%<----%<----%<----%<----%<----%<----%<----%<----%<----%
<----%<----%<----
A sample XML document instance with doctype declaration:
--

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS
0.91//EN"
              "
http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
  <!-- channel definition etc. -->
</rss>

----%<----%<----%<----%<----%<----%<----%<----%<----%<----%
<----%<----%<----
The java error stack trace when running the program:
--

java.net.UnknownHostException: my.netscape.com
        at
java.net.InetAddress.getAllByName0(InetAddress.java:573)
        at
java.net.InetAddress.getAllByName0(InetAddress.java:542)
        at
java.net.InetAddress.getByName(InetAddress.java:451)
        at java.net.Socket.<init>(Socket.java:94)
        at
sun.net.NetworkClient.doConnect(NetworkClient.java:50)
        at
sun.net.www.http.HttpClient.openServer(HttpClient.java:316)
        at
sun.net.www.http.HttpClient.openServer(HttpClient.java:427)
        at
sun.net.www.http.HttpClient.<init>(HttpClient.java:256)
        at
sun.net.www.http.HttpClient.<init>(HttpClient.java:266)
        at
sun.net.www.http.HttpClient.New(HttpClient.java:278)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:368)

        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:453)

        at java.net.URL.openStream(URL.java:814)
        at
org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:149)

        at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:767)

        at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:566)

        at
org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1131)

        at
org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2177)

        at
org.apache.xerces.framework.XMLDocumentScanner.access$000(XMLDocumentScanner.java:86)

        at
org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:882)

        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)

        at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)

        at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:386)
        at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:455)
        at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:436)
        at
nava.news.RSS.RSSFactory.read(RSSFactory.java:84) 
----%<----%<----%<----%<----%<----%<----%<----%<----%<----%
<----%<----%<----




--__--__--

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com


End of jdom-interest Digest






More information about the jdom-interest mailing list