Hi Danny,

The SAXParseException [1] contains location information (see 
getSystemId()). This is not included in the error message. You need to 
extract it programmatically.

Thanks.

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/SAXParseException.html

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Danny Sinang <d.sin...@gmail.com> wrote on 27/03/2012 09:50:35 PM:

> Hi Andrew,
> 
> Which XML document ? The one I'm trying to validate ? Or the XSD 
> schemas I'm using to validate it ?
> 
> There's only one XML document being validated and I made sure to add
> a <?xml version="1.0" encoding="UTF-8"?> at the beginning of the 
> file, making sure there's no whitespace before it. Still running 
> into the same error.
> 
> As for the XSD, there's one main XSD, but it imports and includes 
> other XSD's. 
> 
> Besides inspecting all those XSD files (there are lots of them) for 
> whitespaces, is there a way to get Xerces to indicate which XSD it 
> finds the problem in ?
> 
> Regards,
> Danny
> 
> On Tue, Mar 27, 2012 at 6:11 PM, Andrew Welch <andrew.j.we...@gmail.com
> > wrote:
> > I modified my catalog to use systemId, but I'm now getting the error 
below.
> > Any idea what it means ?
> >
> > org.xml.sax.SAXParseException: The processing instruction target 
matching
> > "[xX][mM][lL]" is not allowed.
> 
> That means you've got whitespace in front of the xml prolog...
> 
> --
> Andrew Welch
> http://andrewjwelch.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to