Android documentbuilderfactory setvalidating
* @param input The stream containing the region metadata to parse. */ public List/** * * @see org.jboss.shrinkwrap.node. Node Descriptor Exporter Impl#to(org.jboss.shrinkwrap.node. A validator may modify the SAX event stream (for example by adding default values that were missing in documents), and a parser is responsible to make sure that the application will receive those modified event stream. Note that "the validation" here means a validating parser as defined in the XML recommendation.In other words, it essentially just controls the DTD validation.Parser Configuration Exception if thrown by JAXP methods */ private Document Builder create Document Builder(Document Builder Factory factory) throws Parser Configuration Exception /** * Return true is the WSDl version is 2.0, false othervise * @param xml Source The WSDL File to check * @return True if the document version is 2.0, false otherwise * @throws Exception If a problem occurs */ private boolean is Wsdl2(String xml Source) throws Exception /** * Replaces the given plug-in-versions in given feature.xml-File. NOTE: this file will be changed and thus must be writable * @param qualifier The new version for this feature.
But it looks this feature exists in xerces.So I guess it means these features (used for document validation) are not supported in Android SDK for now. I found these error using an Epub parser library available in Android Arsenal Epub Parser.
Document parse Configuration(String resource Path) throws Exception /** * Turn an XML String into a DOM. * @return the new document * @throws Parser Configuration Exception for errors during creation */ private static Document get New Document() throws Parser Configuration Exception /** * Parses the string as the body of an XML document and returns the document element. */ private Document parse(final String source) throws Exception /** * Create a JAXP Document Builder that this bean definition reader will use for parsing XML documents.
*/ public static Document get Document(String xml) throws SAXException /** * Turn an XML String into a DOM. * @return A DOM Object containing a parsed XML document or a null value ifthere is an error in parsing.
When warnings/errors/fatal errors are found by the validator, the parser must handle them as if those errors were found by the parser itself.
In other words, if the user-specified is set, it must receive those errors, and if not, they must be treated according to the implementation specific default error handling rules.