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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -