This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread 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 Building Microservices this week in the Design 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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: building error when validating against schema using jdom
 
It's not a secret anymore!