Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XmlAdapter and XMLSchemas
Message
From
12/11/2004 13:09:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
XmlAdapter and XMLSchemas
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
00960940
Message ID:
00960940
Views:
60
I'm trying to convert VFP cursor to XML using external schema, It's really easy using CursorToXML(), but I'm playing arround XMLAdapter to use the properties included.

I've seen that when I specify the XMLSchema using the XMLSchemaLocation property the ToXML method include the full path to the resultant XML File, is it correct?

Here's the code to reproduce it:
CREATE CURSOR test (iid int, cClave c(10), dFecha d)

INSERT INTO test(iid, cClave, dFecha) ;
  VALUES (1,"001",DATE())

oXML = CREATEOBJECT("XmlAdapter")
oXML.AddTableSchema("test")
oXML.XMLSchemaLocation = "test.xsd"
oXML.ToXML("test.xml",,.T.)
The XML file has the following:
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<VFPDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="C:\Documents and Settings\Epalma\Mis documentos\Visual FoxPro Projects\test.xsd">
	<test>
		<iid>1</iid>
		<cclave>001</cclave>
		<dfecha>2004-11-12</dfecha>
	</test>
</VFPDataSet>
Did I miss something? This shouldn't include the full path, this doesn't happend when specify de XMLSchema in the ToXML method:
oXML.ToXML("test.xml","test.xsd",.T.)
TIA
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Next
Reply
Map
View

Click here to load this message in the networking platform