This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
It generates a SAXException when the document is invalid. It displays the error code (such as cvc-attribute) in the message of exception . But i need the error code in the program. is there any way to get the generated error code.
Thanks in advance.
Sachin
Choon-Chern Lim
Ranch Hand
Joined: Aug 29, 2005
Posts: 74
posted
0
Yes....
You need to create a valid validator handler for that which basically extends DefaultHandler.
Choon-Chern Lim
Ranch Hand
Joined: Aug 29, 2005
Posts: 74
posted
0
Sachin Kumar Khandelwal
Greenhorn
Joined: Dec 02, 2003
Posts: 8
posted
0
Hi Mike,
Thanks
The code in the url will give me the complete message, includes the error code and the description (handler.saxParseException.getMessage()) .
but i only want the error code (not the message or description).
Sachin
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Moving to XML...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How to get the error code of xml validation error ?