OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] XML is not being Validated against schema...?

[ Lists Home | Date Index | Thread Index ]

Try something like this in script - ensure you change the details to
reflect your own.


<script language="vbscript">
Set SchemaCache = Server.CreateObject("Msxml2.XMLSchemaCache.4.0")
SchemaCache.add "targetnamespace", "file.xsd"

set xmldoc = Server.CreateObject("Msxml2.DOMDocument.4.0")
xmldoc.async = false
xmldoc.validateOnParse = false
xmldoc.schemas = SchemaCache
xmldoc.load server.mappath("doc.xml")

'set innerHTML property of some element...
</script>

Cheers,
Steven

-----Original Message-----
From: SISCO [mailto:SISCO@ltasolutions.com] 
Sent: 15 August 2002 17:59
To: xml-dev@lists.xml.org
Subject: [xml-dev] XML is not being Validated against schema...?

Hello,

I am a newbie at xml.  Have tinkered with xml using MSXML2 and some
transformation in HTML.

In wanting to do more, I have created a Contacts.xml document and
temp.xsd schema...the xml document Does reference the xsd.  I purposely
included an invalid element in the Contacts.xml doc and included
elements out of sequence.  

The problem --> Contacts.xml loads right up in my IE6.0 browser. 
Shouldn't I be getting some sort of error?  I know that when I load a
doc against a DTD using msxml2.DOMDocument4 I receive parsererrors.


Help...

Dan Sisco
LTA Software Solutions
(417) 883-7918
sisco@ltasolutions.com

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS