Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Schema Validation
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00988563
Message ID:
00988709
Views:
48
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform