This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: building error when validating against schema using jdom