>>I am trying to use the output file created by XmlListener. I believe the schema is described in the VFP 9 help topic "Using VFP Report Output XML".
>>
>>I feel silly to ask, but how do I go about it? Since I will have to do with all the information in the file, not just a few bits, can I create cursors from the XML data? XMLTOCURSOR wouldn't work here, I presume.
>
>What are you trying to acomplish?
I am trying to obtain information to prepare an Excel sheet without creating a new listener class.
>>As long as I have your attention, what is the recommended way to extract data from xml othern than XMLtocursor?
>
>
>You can use XmaAdapter or MSXML (XMLDom or SAX).
Thank you very much, Sergey. My problem is "lack of ignorance" :) I have no idea how to use XMLDom or SAX.
I am trying the following code, which caused the error mentioned at the end:
loReportListener = NEWOBJECT('XmlDisplayListener', '_REPORTLISTENER.vcx')
loReportListener.targetfilename = 'xxx.xml'
loReportListener.QuietMode = .T.
REPORT FORM (tcReport) OBJECT loReportListener
loXMLadapter = NEWOBJECT('xmladapter')
loXMLAdapter.XMLSchemaLocation='path\xmllistenerschema.xsd'
lcXml = FILETOSTR(loReportListener.targetfilename)
loXMLAdapter.LoadXML(lcXml)
loXMLAdapter.Tables.Item(1).ToCursor()
Error #1435 in Frx2excel_xmllistener line 32
"loXMLAdapter.LoadXML(lcXml)"
msxml4.dll : file:///c:/vpay931/contab/sosa/xmllistenerschema.xsd#/schema[1]/group[position() = 2 and @name = 'GroupedBands']/sequence[1]
The 'minOccurs' attribute is not supported in this context.