Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 29th, 2006, 04:11 AM
Registered User
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Satnam
Default SAX Validation against multiple XSDs in MSXML

I'm using MSXML 6.0 for SAX parsing in a C++ application.

How do I validate my XML against an XSD which is in-memory (not a physical file), and which in turn references 3 other XSDs through the <xsd:include schemaLocation="abc.xsd"/> construct?
All the four XSDs are housed inside a DLL and have to be used without converting them to actual files.

Currently, I am following the steps below to accomplish the desired validation:

1. Writing the contents of the primary xsd to a IStream
2. Attaching this IStream to a IXMLDOMDocument, and then
3. Parse this xsd to retreive the name of the other three xsds it internally reference
4. Extract the bodies of each of these xsds and insert them one-by-one just after the header of the main xsd.
5. The new (& large) programmatically created xsd is then added to the IXMLDOMSchemaCollection2.

This is resulting in a huge performance-hit, and the performance benefits for which I am shifting from xerces to MSXML remains unjustified.
Request you to please suggest a better method of performing validation in this scenario.


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple email validation (different format) kumiko Javascript 2 July 22nd, 2008 08:06 AM
Multiple emails validation in one text box with co kumiko Javascript 5 February 7th, 2008 05:49 AM
ch12 sax humayunlalzad BOOK: Beginning XML 3rd Edition 1 May 5th, 2007 10:19 AM
how to use sax parser pavanntcs XSLT 3 September 13th, 2006 02:02 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.