Hi,
I've tried everything I know and cannot get VFP 8.0 to read this XML. Can
anyone offer any suggestions.
I'm using XMLTOCURSOR, but the header is contained in the first record and
the last item is contained in record #2. Why does this command bypass all
the items and only process the last one (there are actually about 200 item
tags). Also, all the info is contained in one field. Do I need to upgrade
to VFP9
Thanks in advance,
John
Here is my code...
lcfilename = GETFILE("xml")
XMLTOCURSOR(lcfilename,"mhc_temp",512)
SELECT mhc_temp
BROWSE
USE inv_temp IN SELECT(1)
SELECT inv_temp
APPEND FROM DBF("mhc_temp")
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <order>
- <header>
<ordernum>MHC000035783</ordernum>
<ponum />
<status>Closed</status>
- <billaddr>
<name>OBS</name>
<addr1>thens Rd</addr1>
<addr2>P O 999</addr2>
<addr3 />
<city>Cd</city>
<state>NY</state>
<zip>10563</zip>
<phone>7123982983</phone>
</billaddr>
- </header>
- <trailer>
- <item>
<num>10379</num>
<name>Bulbs 13W Cfl Mini Twist</name>
<mfgnum>BPESL13T</mfgnum>
<qty>2</qty>
<shipped>2</shipped>
<price>2.71</price>
<retail>5.39</retail>
<returned>0</returned>
</item>
- <item>
<num>10586</num>
<name>Tarpaulins 10X12 Blue Poly Tar</name>
<mfgnum>PT1012D</mfgnum>
<qty>2</qty>
<shipped>2</shipped>
<price>3.71</price>
<retail>7.39</retail>
<returned>0</returned>
</item>
- <item>
<num>10597</num>
<name>Tarpaulins 20X30 Blue Poly Tar</name>
<mfgnum>PT2030D</mfgnum>
<qty>1</qty>
<shipped>1</shipped>
<price>18.54</price>
<retail>37.09</retail>
<returned>0</returned>
</item>
- <item>
<num>10623</num>
<name>Blades V/A Hacksaw Blades</name>
<mfgnum>48236</mfgnum>
<qty>6</qty>
<shipped>6</shipped>
<price>.81</price>
<retail>1.69</retail>
<returned>0</returned>
</item>
<trailer>
<order>