I am using javax.xml.validation.Validator from SchemaFactory.newInstance (XMLConstants.W3C_XML_SCHEMA_NS_URI) to perform an XSD check.
I would like to receive an error message for validation errors. All I get now is: org.xml.sax.SAXParseException: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'TypeCode'.
org.xml.sax.SAXParseException: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'TypeCode'.
Is it possible to print an error, which element or xml fragment did not pass the test?
* Edit: I use standard java6 xml parsers * Edit2: Sorry for the lack of mention - I use JAXB to read XML using a content handler and listener (due to the fact that XML is> 1 GB in most cases).
, (, Xerces ?), . , , Sun Multi-Schema Validator, , . DTD Woodstox , XML Schema MSV.
; / ( - ). , , , , SAX, SAX API.
ErrorHandler Validator SAXParseException?
Source: https://habr.com/ru/post/1770043/More articles:fill out the form automatically - c #Is there a way in vi / vim to make Visual Block Mode without pipeline restrictions? - vimGNU Prolog - recursion problem (easy?) - recursionWhen is Scala going to trash? - garbage-collectionWhy is there always a 10px add-on in System.Windows.Controls.Button? - paddingIs the malloc return value a virtual or physical address? - cDelete expression - c ++Google spreadsheet as db for web applications - google-spreadsheetproblem to set application name in android? - androidSQL Server: proc can be stored from which tables are updated from the UDF CLR - sql-serverAll Articles