You may need to set a resolver and read these things in your own code. On Thu, Oct 29, 2009 at 8:24 PM, DeWayne <dewayne.c.dantz...@boeing.com>wrote:
> > I'm trying to parse an xml file with entities like the one below. I'm > sitting > behind a firewall as well and I'm using Xerces-j-2.9.1 to implement the > SAXParser. I need the Parser to resolve the entity. When I run the app, I > get the java exception java.net.UnknowHostException: www.w3.org. Code and > command line args given below. > > entity requiring navigation of the internet to resolve it > =========================== > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE mpd SYSTEM "mpboe03.dtd" [ > <!ENTITY % isobox PUBLIC "-//W3C//ENTITIES Box and Line Drawing//EN//XML" > "http://www.w3.org/2003/entities/2007/isobox.ent" > > %isobox; > > code snippet to setup the parser > ======================== > > try { > parser = > XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser"); > parser.setErrorHandler(this); > > // Turn on validation > parser.setFeature("http://xml.org/sax/features/validation", true); > ...} > > //invoke the parser along with the schema/dtd to use and the xml file to > parse > ================ > try { > parser.setProperty(" > http://java.sun.com/xml/jaxp/properties/schemaSource", > schema.getAbsolutePath()); > parser.parse(xmlfile2Parse.getAbsolutePath()); > } > > //command line options to navigate the firewall - specify the proxy and > port > ====================================== > java -Dhttp.proxyHost=\"www-use-proxys.web.foo.com\" > -Dhttp.proxyPort=\"98760\" -classpath .:xercesImpl.jar myApp > > -- > View this message in context: > http://www.nabble.com/How-to-resolve-UnknownHostException-with-Xerces-J-API--tp26123150p26123150.html > Sent from the Xerces - J - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org > >