Discussion:
validating XML with XSD at classic asp
(too old to reply)
t***@gmail.com
2007-06-11 13:26:13 UTC
Permalink
Hi there.

I am not an ASP nor VbScript programmer, but I need to do an
application using classic ASP to receive a XML file, validate it using
XSD and parse the XML to get some of its info to a database. I am
having a hard time to find how to do it since most of the internet
materials on ASP are for .NET, not for classic ASP.

Does someone know how to validate a XML file with XSD using classic
ASP? Is that even possible? If so, can you please give me a code
example?

Also, is there anywhere I can find good documentation on msxml api? I
canĀ“t seem to find something easy and objective about it like java
programmers have with javadoc.

Thanks for any help you guys can give me,
Thiago.
Martin Honnen
2007-06-11 13:45:07 UTC
Permalink
Post by t***@gmail.com
I am not an ASP nor VbScript programmer, but I need to do an
application using classic ASP to receive a XML file, validate it using
XSD and parse the XML to get some of its info to a database. I am
having a hard time to find how to do it since most of the internet
materials on ASP are for .NET, not for classic ASP.
Does someone know how to validate a XML file with XSD using classic
ASP? Is that even possible? If so, can you please give me a code
example?
MSXML 4 or later (so now MSXML 6) do support validation against XSD schemas.
See the MSXML SDK here:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/b24aafc2-bf1b-4702-bf1c-b7ae3597eb0c.asp>

For validation build an XMLSchemaCache to load the schema(s), then set
the schemas property of a DOMDocument, then load the XML document.

If you need more help and sample code then tell us whether you want to
use VBScript or JScript in your ASP.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Martin Honnen
2007-06-11 13:48:04 UTC
Permalink
Post by Martin Honnen
MSXML 4 or later (so now MSXML 6) do support validation against XSD schemas.
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/b24aafc2-bf1b-4702-bf1c-b7ae3597eb0c.asp>
For validation build an XMLSchemaCache to load the schema(s), then set
the schemas property of a DOMDocument, then load the XML document.
Example in the MSXML SDK is here:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/e6a6510b-4177-4d79-a94e-a3cac13e6c0c.asp>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Loading...