Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using external XSD with xmltocursor()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00775682
Message ID:
00776025
Vues:
15
Hi Paul,

To make sure that the XMLTOCURSOR() function will work with an external XSD file, the xsi:noNamespaceSchemaLocation attribute must exist at the root node of your instance document. Please, take a look at the following code and pay attention to the XML data generated by the CURSORTOXML() function.
CREATE CURSOR Customers (ID Integer, Name Char(30))
INSERT INTO Customers VALUES (1, "Fabio")
INSERT INTO Customers VALUES (2, "Vazquez")

*-- We Create the XML and XSD files from the data
CURSORTOXML("Customers", "Data.xml", 1, 0+512, 0, "Schema.xsd")

*-- Notice the "xsi:noNamespaceSchemaLocation" attribute on the root node
MODIFY FILE "Data.xml"

*-- We read the data from an XML file with a external schema
XMLTOCURSOR("Data.xml", "NewCust", 512)

BROWSE
Thanks!
-----
Fabio Vazquez
http://www.fabiovazquez.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform