Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorToXML with Schema?
Message
From
26/04/2018 09:28:07
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01659589
Message ID:
01659590
Views:
60
>Hi,
>
>Can CursorToXml() function create the internal schema of the cursor? Maybe "internal" is not the right term but what I mean is that the resulting XML would have the schema inside the XML file, at the top, such that when using XmlToCursor() this scheme is used.
>
>TIA

Yes, Dmitry, simply set the name of the schema to "1" - that will produce an inline schema:
CREATE CURSOR Books (Author Varchar(50), Title Varchar(200), YearOfPublication Integer)

INSERT INTO Books VALUES ("William Golding", "Lord of the flies", 1954)
INSERT INTO Books VALUES ("Anatole France", "L'Île des pingouins", 1908)

CURSORTOXML("Books", "books.xml", 1, 512, 0, "1")

MODIFY FILE books.xml NOWAIT NOEDIT
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform