views:

38

answers:

0

I am using JDOM parser that read my XML and it include validation using xsd schema.

generally, in order to set the path of the xsd to the parser the syntax, according to the documentation is-

        SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
        builder.setFeature("http://apache.org/xml/features/validation/schema", true);
        builder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", <schema_path>);

It can work by setting the schema_path to be either url starting with http: or absolute path (i.e. c:/myFolder/schema.xsd)
My question - how can I use an xsd that is located withing my web-application and the path to it will be somewhere beneath the Web root? is it possible to provide relative path to the JDOM builder?

People that are capable of answer this question might also assist in solving another problem I faced regard using xsd:
in this thread here