W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2005

How to enable DOM parser use the Schema to validate an XML Document

From: Sagar Balan <sagar.balan@gmail.com>
Date: Wed, 5 Oct 2005 17:49:42 +0530
Message-ID: <53d136470510050519t42363035s2f83318759ad3b11@mail.gmail.com>
To: xmlschema-dev@w3.org
Hi to all XML users,
I'm using *DOM Parser provided by Xerces* C++ on HP-UX . I'm building the
parser using the *DOMBuilde*r object(parse member function).

*My Requirement => An XML file has to be parsed and validated against an XML
schema*. The XML schema has been created according to
W3schools.org<http://W3schools.org>website.

Though I've mentioned the XMLSchema(<GenericLaunchMsgAdapter_contacts
xsi:noNamespaceSchemaLocation="LaunchAdapter.x
sd">
) in the XML document and enabled the parser settings like
fgXercesSchema,fgXercesSchemaFullChecking,:fgDOMValidateIfSchema
*the parser does not validate the XML document using the schema*.

I've tried mentioning the schema location in the XML document as
file://<absolute_path.xsd> . This also does not work.

*How do I make the DOM parser validate my XML file against the XML schema*?

*Could anyone please help me?*
**
*Thanks & Regards,*
*Sagar Balan*
Received on Wednesday, 5 October 2005 12:37:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:51 GMT