String schemaLang = "http://www.w3.org/2001/XMLSchema";
SchemaFactory factory = SchemaFactory.newInstance(schemaLang);
Schema schema = factory.newSchema(new StreamSource("sample.xsd"));
Validator validator = schema.newValidator();
validator.validate(new StreamSource("sample.xml"));
7/9/08
Java and XML: validation XML
JAXP 1.3
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment