Mukul Gandhi-4 wrote:
> 
> On Fri, Aug 20, 2010 at 1:50 PM, ZagZig <powe...@web.de> wrote:
>> cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
>>
>> which is correct, but i would like to print out the name of the element
>> with
>> the invalid value.
> 
>> line number: 33
>> column number: 22
> 
> you are using SAXParseException [1] class to retrieve error details
> (which we should). This also inherits methods from SAXException [2].
> 
> So we are limited to error information provided by these classes.
> 
> As far as your ability to point to the relevant places in XML or
> schema documents, I think line and column numbers should be
> sufficient.
> 
> [1]
> http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/SAXParseException.html
> [2]
> http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/SAXException.html
> 
> 
> 
> -- 
> Regards,
> Mukul Gandhi
> 

Thanks a lot Mukul. The problem is that the validation is on server side and
if an element is missing or not valid, then i want to send a response to the
client, that the element xy isn't valid. But if there is no way to get the
element name by the sax exception i'll maybe parse the element by the line
and column number out of the xml and send this and the exception back as the
result.

Best regards,
Lars.

-- 
View this message in context: 
http://old.nabble.com/missing-element-name-in-validation-result-tp29489740p29490134.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

Reply via email to