Groups | Blog | Home
all groups > vj# > september 2005 >

vj# : Xerces and .NET


andreister NO[at]SPAM gmail.com
9/2/2005 10:19:12 AM
Hi there!
I'm trying to valiadte XML against XSD using org.apache.xerces library.

The code resembles the following (working OK on j2ee)
==============================================
SAXParserFactory spf = new SAXParserFactoryImpl();
spf.setNamespaceAware(true);
spf.setValidating(true);
spf.setFeature(
"http://apache.org/xml/features/validation/schema",
true);
spf.setFeature(
"http://apache.org/xml/features/validation/schema-full-checking",
true);
SAXParser saxParser = spf.newSAXParser();

// the next line fails with org.xml.sax.SAXNotRecognizedException
saxParser.setProperty(
"http://java.sun.com/xml/jaxp/properties/schemaLanguage",
"http://www.w3.org/2001/XMLSchema");
....
==============================================

I guess that the Xerces being shipped with the .NET JDOM does not
support JAXP (right?).

So, at first I'm just curious if it is possible to use apache xerces
for validation from J# (I'm using Framework 1.0 if it matters).
Secondly - if the first answer is "yes" :) - I'm looking forward
hearing from you guys how to circumvent this issue.

Thank you!
Andrew



But unfortunately,
Lars-Inge Tønnessen [VJ# MVP]
9/5/2005 6:48:11 PM

Please try the J# Xerces port.

http://www.dotnetit.org/xerces.net/index.html


Regards,
Lars-Inge Tønnessen

andreister NO[at]SPAM gmail.com
9/7/2005 12:23:44 AM
Lars-Inge,
AFAICS it requires .NET Framework 1.1.x or later, though I'm stuck to
the 1.0

Thank you nevertheless,
Andrew
AddThis Social Bookmark Button