Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing NULL values in XML
Message
 
 
To
11/12/2009 23:09:28
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01438743
Message ID:
01438744
Views:
69
>I need to import and export data from VFP to XML. XMLTOCURSOR doesn't natively support NULLS. I'm wondering in anyone has a VFP solution?

The XMLTOCURSOR() does support NULL values as absent elements or attributes in XML.
CREATE CURSOR Test (PK I, txt C(20) NULL, val1 I NULL, dt D NULL)
INSERT INTO Test VALUES (1, "One", 1, DATE())
INSERT INTO Test VALUES (2, "Two", 2, NULL)
INSERT INTO Test VALUES (3, "Three", NULL, NULL)
INSERT INTO Test VALUES (4, "Four", NULL, DATE())
CURSORTOXML(0, "Test.xml", 1,512,0, "1")
*MODIFY COMMAND Test.xml
XMLTOCURSOR("Test.xml", "crsTestFromXml", 512)

BROWSE NOWAIT
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform