![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - xml validation using msxml and schema >Thread Next - Re: xml validation using msxml and schema Re: xml validation using msxml and schemaTo: NULL Date: 1/3/2005 6:57:00 PM
cyberleo80@l... wrote:
> i tring to validate an xml doc at runtime with this code:
>
> set objXMLSchema = Server.CreateObject ("Msxml2.DOMDocument.4.0")
> objXMLSchema.async = false
> objXMLSchema.validateOnParse = true
> objXMLSchema.load Server.MapPath(".") & "schemas\Schema.xsd"
>
> set objXMLSchemaCache =
> Server.CreateObject("Msxml2.XMLSchemaCache.4.0")
> objXMLSchemaCache.add "", objXMLSchema
>
> objXMLDocument.async = false
> objXMLDocument.validateOnParse = true
>
> set objXMLDocument.schemas = objXMLSchemaCache
>
> objXMLDocument.load( Request )
Check the return value of the load method e.g.
Dim Valid
Valid = objXMLDocument.load(Request)
If Valid Then
...
Else
check objXMLDocument.parseError.reason
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
