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
Title:
Simple XML to VFP nightmare
Miscellaneous
Thread ID:
01667970
Message ID:
01667970
Views:
90
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?
Next
Reply
Map
View

Click here to load this message in the networking platform