Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Schema Validation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
00988563
Message ID:
00988709
Vues:
51
It's better to use TRY...ENDTRY instead of changing global error handler. In addition, it wouldn't work if put in a class with it's own error handler.

>You may need to use MSXMLDOM.Document (it as a "validated" property).
>Here's some sample script:
>PROCEDURE SET_DOMObject
>lcErrorHandler=ON('error')
>ON ERROR oXML=.NULL.
>oXML=CREATEOBJECT("MSXML2.DOMDocument.4.0") &&Try an implicit connect to 4.0
>ON ERROR &lcErrorHandler
>IF ISNULL(oXML) && Can't get 4.0
>   oXML=CREATEOBJECT("MSXML.DOMDocument") && Generic
>ENDIF
>oXML.async=.f.
>*oXMl.preserveWhiteSpace=.f.
>oXML.setProperty("SelectionLanguage","XPath")
>ENDPROC &&SET_DOMObject
>
>We also have MSXML2.XMLSchemaCache.3.0 to work specifically with schemas. Two ways to assure XSD: 1) The DOMDocument will validate as true when the XML is lioaded. 2) You will see the XSD information [nodes] added to the DOM afer it is loaded.
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform