Validating xml with sax parser

We tried with setting input buffer size of parser like Property(" Integer(2)); , which doesn't make significant difference. public boolean validate Resource(String input XML, Input Stream schema Stream) throws Client Application Data Processing Exception It would be great if any one could give an idea to reduce the 100% CPU utilization. Do you mean the CPU goes to 100% but the process never finishes? Why did you think that fiddling with the input buffer size would do anything?

Bill (I suspect you have coded an infinite loop in one of the event handlers so the code you show has nothing to do with the problem.) [ September 16, 2005: Message edited by: William Brogden ] The soul is dyed the color of its thoughts. Your integrity is your destiny - it is the light that guides your way.

The input document contains an extra attribute which has not been defined in the XML Schema, this shows that the XML Schema has been used for the validation.DOMParser is recommended if the DOM tree structure of an XML document is required for random access and modification of the XML document.In this section we shall validate the example XML document with XML schema document catalog.xsd, with the SAXParser class. Create a SAXParser object and set the validation mode of the SAXParser object to SCHEMA_VALIDATION, as shown in the following listing: Validates the complete XML document with an XML schema if the parser is able to find a schema.An XMLSchema object represents the DOM structure of an XML schema document and is created with an XSDBuilder class object.Create an XSDBuilder object and invoke the build(Input Source) method of the XSDBuilder object to obtain an XMLSchema object.

Leave a Reply