Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLTOCURSOR()

Status
Not open for further replies.

Ferdalizer

Programmer
Jun 29, 2004
19
US
Hi all,

Has anyone used this function? I have an invoice type file in XML and I want to be able to convert it to a table for USPS Presort processing, then create a report for printing the invoice. So far all it does is put all the data into a string and into one field called t112.

Here is a small sample of the data

<?xml version="1.0" ?>
<?encoding UTF-8?>
- <navision>
<id>1</id>
<date>20070921T000000000</date>
<userid>cgortemaker</userid>
- <data>
- <t112>
- <!-- Sales Invoice Header
-->
- <record>
<f2 id="f2">12261</f2>
- <!-- Sell-to Customer No.-20-Code
-->
<f3 id="f3">WO-000003</f3>
- <!-- No.-20-Code
-->
<f4 id="f4">12261</f4>
- <!-- Bill-to Customer No.-20-Code
-->
<f5 id="f5">COMPANY NAME</f5>
- <!-- Bill-to Name-50-Text
-->
<f6 id="f6" />
- <!-- Bill-to Name 2-50-Text
-->


Thanks in advance for any help!

Fred Fattore
 
Hi Fred,

XML can take a unlimited number of formats. XMLToCursor() has a limited understanding and expects to receive something similar to what is generated when you use CursorToXML(). If your incoming XML has a schema the I suggest using an XMLAdapter class to give VFP more information on how to parse the XML.

pamela
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top