GeeCON Prague 2014*
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


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,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: building error when validating against schema using jdom