Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Schema validation problem with MSXML 4

[b][red]This message was edited by Badfrog66 at 2002-9-26 10:32:50[/red][/b][hr]
Hi all,

I've been messing around with MS's DOM parser, trying to validate a document against a schema. I've got the following XML doc:

<?xml version="1.0"?>


lamont adams
my book
fantasy
26.99
2005-12-31
it's fantasy till I write it



that I built with MSXML2.DOMDocument40

I haven't been able to get the parser to automatically load the associated schema when the document is loaded (thought that the xmlns and noNamespaceSchemaLocation attributes on the root element would do the trick, but it doesn't). When I load the schema into the DOMDocument40.schemas schema cache, and validate the above document I get an error: "The attribute 'noNamespaceSchemaLocation' on this element is not defined in the DTD/Schema." Well, of course it isn't!

The document validates fine in XMLSpy, so I'm not sure what's up here. I initially thought this was a bug, but there's nothing in the MSKB about it, so I assume I'm not doing something with DOMDocument40 that I'm supposed to in order to make this work. Any ideas?

Sign In or Register to comment.