This method creates the actual XML body for cursor data. The data layout starts with the cursor level:
<cursor>
<row>
<data1/>
<data2/>
</row>
</cursor>Use this method if you want to combine multiple objects/cursors into a single XML document, or if you want to create a very simple XML layout. This document is well formed, but requires at least the <?xml version="1.0"> header.
o.CreateCursorXML(lcName, lcRowName, lnIndent)
lcRowName
Optional - The element name used for each row of the cursor.
Default value: "row"
lnIndent
Optional - Indentation level to start with.
*** Example to create multiple cursors into a single XML doc with DTD
CLOSE DATA
#INCLUDE WCONNECT.H
oXML = CREATE("wwXML")
*** Create the DTDs for the two tables
Use wwbanners
lcDTD1 = oXML.CreateDataStructureDTD("wwbanners","banner")
SELE 0
Use requestlog
*** Add the root node manually
lcOutput = "<LowLevel>" +CR
*** Now create the data XML
SELE wwbanners
lcOutput = lcOutput + oXML.CreateCursorXML("wwbanners","banner",2)
SELE requestlog
lcOutput = lcOutput + oXML.CreateCursorXML("requestlog","request",2)
*** Must add XML header and add the closing DocRoot element
lcOutput = [<?xml version="1.0"?>] + CR +;
CR + lcOutput + ;
"</LowLevel>"
*** Show it
StrToFile(lcOutput,"t2.xml")
MODI COMM t2.xml nowait