wwXML::CursorToADOXML

This method exports XML in the ADO compatible XML format. This format is very specific to ADO and although a valid XML structure is not a well designed document and unlikely to be used anywhere else. The output is the equivalent of doing rs.save('filename',1) from ADO.

This method is between 10-20% faster than the VFPCOM utilities CursorToRS export. To directly load the XML into an ADO recordset use the example listed below.

For full XML format see the XML Structures topic.

o.CursorToADOXML()

Return Value

XML string of the converted cursor/table

Parameters

none

Remarks

General fields are not supported.

Don't use this method to export to XML unless you need to import the result data
into an ADO recordset on the other end. This XML is hard to parse and very
non-standard. Use CursorToXML instead.

Currently there's no way using this class to convert this XML back into a
cursor.

Example

o=create('wwXML')

*** Create the XML and dump to file
lcXML = o.CursorToADOXML()
STRTOFILE(lcXML,'c:\temp\wcado.xml')

*** Open the recordset in ADO
rs = createobject('adodb.recordset')
rs.Open('c:\temp\wcado.xml')

*** Check if all is well!
? rs.recordcount

See also:

Class wwXML (High Level Methods) | wwxml::CursorToXML | XML structures

© West Wind Technologies, 2023 • Updated: 10/21/99
Comment or report problem with topic