java - Validating XSD itself -
could please tell me how validate xsd file (not xml against xsd)? have checked many forums , sites (including so) , of them refers or other online validator. not one-time check us. our application involves xsl transformation using xsd, need determine whether xsd used in valid format or not, in, tags match, starting , closing one. tags aren't allowed child tag, etc. that's why need proper java code achieve same.
any highly appreciated.
you can try javax.xml.validation package
schemafactory f = schemafactory.newinstance(xmlconstants.w3c_xml_schema_ns_uri); schema s = f.newschema(new file("1.xsd"));
schema.newschema() api
parses specified file schema , returns schema
Comments
Post a Comment