> I am using xerces parser 1.4.4 (SaxParser) for parsing XML messages. 
> The following method is being called (amongst others):
> 
> parser.parse(new InputSource(new StringReader(XMLMessage) ) );

When you use character stream (StringReader) to feed your XML, parser doesn't 
know against which to resolve (relative) external parsed entities. So, it tries 
to resolve against the base directory from where you are running. You should 
set 
the systemId to provide a base for resolving relative URIs.
 
 InputSource isource = new InputSource(new StringReader(XMLMessage));
 isource.setSystemId(...);
 
Have a look at SAX documentation for details..

http://www.saxproject.org/apidoc/org/xml/sax/InputSource.html#InputSource(java.i
o.InputStream)
 
--
Neeraj B.
Sun Microsystems, inc.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to