/[classpath]/classpath/gnu/xml/dom/DomDocumentBuilder.java
ViewVC logotype

Diff of /classpath/gnu/xml/dom/DomDocumentBuilder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by gnu_andrew, Sat Feb 12 14:26:02 2005 UTC revision 1.3 by dog, Sat May 14 21:43:43 2005 UTC
# Line 39  package gnu.xml.dom; Line 39  package gnu.xml.dom;
39    
40  import java.io.InputStream;  import java.io.InputStream;
41  import java.io.IOException;  import java.io.IOException;
42    import java.io.Reader;
43    import java.net.URL;
44  import javax.xml.parsers.DocumentBuilder;  import javax.xml.parsers.DocumentBuilder;
45  import org.w3c.dom.Document;  import org.w3c.dom.Document;
46  import org.w3c.dom.DOMConfiguration;  import org.w3c.dom.DOMConfiguration;
# Line 140  class DomDocumentBuilder Line 142  class DomDocumentBuilder
142      throws SAXException, IOException      throws SAXException, IOException
143    {    {
144      LSInput input = ls.createLSInput();      LSInput input = ls.createLSInput();
145        String systemId = is.getSystemId();
146      InputStream in = is.getByteStream();      InputStream in = is.getByteStream();
147      if (in != null)      if (in != null)
148        {        {
# Line 147  class DomDocumentBuilder Line 150  class DomDocumentBuilder
150        }        }
151      else      else
152        {        {
153          input.setCharacterStream(is.getCharacterStream());          Reader reader = is.getCharacterStream();
154            if (reader != null)
155              {
156                input.setCharacterStream(reader);
157              }
158            else
159              {
160                URL url = new URL(systemId);
161                input.setByteStream(url.openStream());
162              }
163        }        }
164      input.setPublicId(is.getPublicId());      input.setPublicId(is.getPublicId());
165      input.setSystemId(is.getSystemId());      input.setSystemId(systemId);
166      input.setEncoding(is.getEncoding());      input.setEncoding(is.getEncoding());
167      return parser.parse(input);      return parser.parse(input);
168    }    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26