I have a problem reading a XML document. The problem is that the parser tries to connect to the server that is indicated in the Doctype.
The XML document is this (Struts-config.xml)
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
 
The code to read it is this
 
     DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
            domFactory.setValidating(false);
            DocumentBuilder domBuilder = domFactory.newDocumentBuilder();
            File fichero=new File("url");
            return domBuilder.parse(fichero);
 
And then the parser (Xerces using JAXP) tries to access jakarta.apache.org
 
How can i solve it?
 
Thank in advance
 
I�igo Serrano
-------------------------------------
http://www.inigoserrano.com
http://isvalidator.sourceforge.net

Reply via email to