aspose file tools*
The moose likes XML and Related Technologies and the fly likes building error when validating against schema using jdom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "building error when validating against schema using jdom" Watch "building error when validating against schema using jdom" New topic
Author

building error when validating against schema using jdom

weishan zhang
Greenhorn

Joined: Sep 25, 2002
Posts: 8
I am using jdom and xerces to validate xml against a schema. Here is the code list:
SAXBuilder saxbuilder =new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
//saxbuilder.setFactory(XVCLBuilderFactory.createFactory());
saxbuilder.setFactory(XVCLBuilderFactory.createFactory());
saxbuilder.setFeature("http://apache.org/xml/features/validation/schema", true);
saxbuilder.setProperty(
"http://apache.org/xml/properties/schema/external-schemaLocation",
"file:///C:/test/test.xsd");
try
{
return saxbuilder.build(url);
}
catch(JDOMException jdomE)
{
System.err.println(jdomE.getCause().getMessage()); }
This is what the FAQ suggested. But I always get the building error message.
Anyone met such problem?
Thanks,
 
Don't get me started about those stupid light bulbs.
 
subject: building error when validating against schema using jdom
 
Similar Threads
Validating XML with Schema
JDOM - XML Validation
Validate against schema
feature not recognized for SAX driver parser.XMLReaderI
PROBLEM IN VALIDATING XML AGAINST AN XSD