You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Nicholas Hemley <Ni...@lhb.scot.nhs.uk> on 2002/09/19 13:03:24 UTC

DocumentBuilder hangs when parsing URI

Hello

I have the following code to parse a file on the local http server:

      URL u = new URL(m_url);
      URLConnection uc = u.openConnection();
      HttpURLConnection conn = (HttpURLConnection)uc;

      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

      //IMPORTANT:this ensures that we keep the xsl:stylesheet namespace, etc.
      factory.setNamespaceAware(true);
      factory.setIgnoringComments(false);
      factory.setExpandEntityReferences(true);

      DocumentBuilder builder = factory.newDocumentBuilder();
      cat.debug("Loading XSL: " + m_url);
      m_document = builder.parse(new InputSource(conn.getInputStream()));
      cat.debug("XSL: " + m_url + " loaded.");

The file URL is: http://localhost:8080/SVGServlet/templates/graph_template.xsl 

I can access the file through my browser, but when I run the code it hangs at the builder.parse() method. I have proxy settings earlier in the code too. 

Is there any way to find out why it is hanging?

Any ideas what I am doing wrong (using Xerces 2.0.2)?

Cheers,
Nic Hemley.



**********************************************************************
The information contained in this message may be confidential or legally privileged and is intended for the addressee only,

If you have received this message in error or there are any problems please notify the originator immediately.

The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden.
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org