Validator (xsd) for xml in android

unwiggituagep

New Member
I have a project with API 10 (2.3.3 version) in Android and i have a problem for the validation of xml with xsd file.This is my code:\[code\]public static Document buildDoc(String xml, String xsd){ // parse an XML document into a DOM tree Document document = null; try { DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance(); parserFactory.setNamespaceAware(true); DocumentBuilder parserdb = parserFactory.newDocumentBuilder(); doc = parserdb.parse(new InputSource( new StringReader(xml) )); SchemaFactory factory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI); //qu
 
Back
Top