Article View: fr.comp.text.xml
Article #8352XSD/VB
From: Damien HOFFMANN
Date: Thu, 22 Nov 2001 17:50
Date: Thu, 22 Nov 2001 17:50
39 lines
1956 bytes
1956 bytes
Bonjour,
je valide un document XML par rapport � un sch�ma de validation XSD gr�ce au
parser MSXML4 dans une application VB par le code suivant :
Dim xmlschema As MSXML2.XMLSchemaCache40
Dim xmldom As MSXML2.DOMDocument40
Set xmlschema = New MSXML2.XMLSchemaCache40
xmlschema.add "", "C:\schema.xsd")
Set xmldom = New MSXML2.DOMDocument40
xmldom.async = False
Set xmldom.schemas = xmlschema
xmldom.Load "C:\document.xml"
If xmldom.parseError.errorCode <> 0 Then
MsgBox xmldom.parseError.errorCode & " " & xmldom.parseError.reason
Else
MsgBox "No Error"
End If
Cependant, le parser de v�rifie pas les cl�s (contrairement � XML Spy)
Quelqu'un aurait-il une id�e ??
Exemple de cl� :
<xs:element name="MyElt" type="MyEltType" minOccurs="0">
<xs:key name="PK_MyElt">
<xs:selector xpath="./MyElt"/>
<xs:field xpath="@nom"/>
</xs:key>
</xs:element>
Merci d avance
Damien
Technical Details
Message-ID:
<3bfd3986$0$26365$7a628cd7@news.club-internet.fr>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!novia!novia!newsfeed.icl.net!dispose.news.demon.net!demon!grolier!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,29b0ef3b52baa6bc,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-11-22 09:44:42 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!novia!novia!newsfeed.icl.net!dispose.news.demon.net!demon!grolier!not-for-mail Reply-To: "Damien HOFFMANN" <damien.hoffmann@club-internet.fr> From: "Damien HOFFMANN" <damien.hoffmann@club-internet.fr> Newsgroups: fr.comp.text.xml Subject: XSD/VB Date: Thu, 22 Nov 2001 18:50:25 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Lines: 43 Message-ID: <3bfd3986$0$26365$7a628cd7@news.club-internet.fr> Organization: Club-Internet / T-Online France NNTP-Posting-Date: 22 Nov 2001 17:44:38 GMT NNTP-Posting-Host: 213.44.213.165 X-Trace: 1006451078 news.club-internet.fr 26365 213.44.213.165 X-Complaints-To: abuse@club-internet.fr