Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLTOCURSOR Missing Fields
Message
From
01/09/2004 11:00:40
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
XMLTOCURSOR Missing Fields
Miscellaneous
Thread ID:
00938410
Message ID:
00938410
Views:
106
We've got a problem. We are using VFP 7.0 and trying to use XML to transfer data across disparate networks, most likely via email. We are using CURSORTOXML make the transfer file and XMLTOCURSOR to retrieve it into the program.

The problem is we've added some new fields to the cursor we're sending, and those fields are not showing up when we use XMLTOCURSOR.

So, what gives? Are we doing something wrong in the code, or is there a bug?

Thanks in advance...

Here is the code we are using to test this.

** Create the transfer file
lcRemotepath = "C:\pwdata\somedata\REMOTE_TRANSFER\dept.xml"
lnReturnResults = CURSORTOXML("department",lcremotepath,1,516,0,"dept")


** Retrieve the data
lcRemotepath = "C:\pwdata\somedata\REMOTE_TRANSFER\dept.xml"
lnRecs = XMLTOCURSOR(lcRemotePath,"deptinfo",512)


Data:
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<VFPData xml:space="preserve" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="dept.XSD">
	<department>
		<idepartmentid>          1</idepartmentid>
		<cdepartmentname>Dept A                                  </cdepartmentname>
		<lallowremote>false</lallowremote>
		<cdeptpassword>               </cdeptpassword>
		<dlastupdload>    -  -  T  :  :  </dlastupdload>
		<dlastdownload>    -  -  T  :  :  </dlastdownload>
		<dmodifiedon>2004-08-31T15:35:34</dmodifiedon>
		<lremoteinsert>false</lremoteinsert>
		<ldeptuploaded>false</ldeptuploaded>
		<lempview>false</lempview>
		<lempdel>false</lempdel>
		<lempmod>false</lempmod>
		<lpaydedview>false</lpaydedview>
		<lpaydistmod>false</lpaydistmod>
	</department>
	<department>
		<idepartmentid>          2</idepartmentid>
		<cdepartmentname>Dept B                                  </cdepartmentname>
		<lallowremote>true</lallowremote>
		<cdeptpassword><Ý&            </cdeptpassword>
		<dlastupdload>2004-08-30T08:45:24</dlastupdload>
		<dlastdownload>2004-08-30T08:45:14</dlastdownload>
		<dmodifiedon>2004-08-31T16:42:44</dmodifiedon>
		<lremoteinsert>false</lremoteinsert>
		<ldeptuploaded>true</ldeptuploaded>
		<lempview>true</lempview>
		<lempdel>true</lempdel>
		<lempmod>true</lempmod>
		<lpaydedview>true</lpaydedview>
		<lpaydistmod>true</lpaydistmod>
	</department>
	<department>
		<idepartmentid>          3</idepartmentid>
		<cdepartmentname>Dept C                                  </cdepartmentname>
		<lallowremote>false</lallowremote>
		<cdeptpassword>               </cdeptpassword>
		<dlastupdload>    -  -  T  :  :  </dlastupdload>
		<dlastdownload>    -  -  T  :  :  </dlastdownload>
		<dmodifiedon>    -  -  T  :  :  </dmodifiedon>
		<lremoteinsert>false</lremoteinsert>
		<ldeptuploaded>false</ldeptuploaded>
		<lempview>false</lempview>
		<lempdel>false</lempdel>
		<lempmod>false</lempmod>
		<lpaydedview>false</lpaydedview>
		<lpaydistmod>false</lpaydistmod>
	</department>
</VFPData>
Schema:
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
	<xsd:element name="VFPData" msdata:lsDataSet="true">
		<xsd:complexType>
			<xsd:choice maxOccurs="unbounded">
				<xsd:element name="department">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="idepartmentid" type="xsd:int"/>
							<xsd:element name="cdepartmentname">
								<xsd:simpleType>
									<xsd:restriction base="xsd:string">
										<xsd:maxLength value="40"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="lallowremote" type="xsd:boolean"/>
							<xsd:element name="cdeptpassword">
								<xsd:simpleType>
									<xsd:restriction base="xsd:string">
										<xsd:maxLength value="15"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="dlastupdload" type="xsd:dateTime"/>
							<xsd:element name="dlastdownload" type="xsd:dateTime"/>
							<xsd:element name="dmodifiedon" type="xsd:dateTime"/>
							<xsd:element name="lremoteinsert" type="xsd:boolean"/>
							<xsd:element name="ldeptuploaded" type="xsd:boolean"/>
							<xsd:element name="lempview" type="xsd:boolean"/>
							<xsd:element name="lempdel" type="xsd:boolean"/>
							<xsd:element name="lempmod" type="xsd:boolean"/>
							<xsd:element name="lpaydedview" type="xsd:boolean"/>
							<xsd:element name="lpaydistmod" type="xsd:boolean"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>
Next
Reply
Map
View

Click here to load this message in the networking platform