Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple XML to VFP nightmare
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01667970
Message ID:
01667973
Views:
54
Thanks John, i also like using the xml dom for complete control, but in this case it will be a pain because i have to send a lot of tables with many fields each...

>Hi Jaime, for me it's better to have full control over the XML, so I recommend to you the object "msxml2.domdocument" with this you will have complete control over any tag included in the xml file with the exact value represented, example:
>PatientID->1
>HomePhone->037951010
>
>More work to do, but better results.
>
>Note The XML provided is missing
<
in close tag city.
>
>John.
>
>Hi
>I am trying to import into a VFP cursor a simple xml generated by Alpha Anywhere, with little to no success, using either xmltocursor or xmladapter.
>The XML string looks like this:
>
><?xml version="1.0" encoding="Windows-1255" standalone="yes"?>
><DOCUMENT>
>	<ROW>
>		<PatientID Type="N">1</PatientID>
>		<PatientName Type="C">Jaime</PatientName>
>		<SH Type="L">0</SH>
>		<Address Type="C">My Address</Address>
>		<City Type="C">Karkur/City>
>		<Zip Type="C">37512</Zip>
>		<HomePhone Type="C">037951010</HomePhone>
>		<Cell Type="C">0521234567</Cell>
>		<Birth Type="D">1973-02-22</Birth>
>		<VIP Type="N">0</VIP>
>	</ROW>
></DOCUMENT>
>
>
>When using XMLToCursor, the cursor gets generated correctly, but the PatientID has a logical .T. value instead of 1, and in the leading "0" in the HomePhone/Cell fields is stripped.
>Using xmladapter after running loadXML there i still have .tables.count = 0
>The only idea that comes to mind is to build cursors with the desired field types, then using 8192 in the xmltocursor flag, but then this will force me to prepare the cursors beforehand for many tables, so if possible i'd like to avoid that.
>Any ideas?
>Thanks
>Jaime
Why do programs stop working correctly as soon as you leave the Fox?
Previous
Reply
Map
View

Click here to load this message in the networking platform