Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proble with XMLToCursor()
Message
 
 
To
17/09/2002 04:09:43
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00701132
Message ID:
00701204
Views:
16
VFP doesn't allow '.' (dot) in a field name. Either make sure that field names adhere to the VFP requirements or parse XML manualy using XMLDOM.

>I need help in using the xmltocursor() function.
>When i import XML data, if one of the fields from the XML file has a dot (.) in it's name, that field will not be correctly imported.
>
>Example:
>
>The following is an example of two lines from the XML file:
>
><item Codigo=“117762“ Descricao=“BANANAS IMPORTADAS“ Preco=“1.05“ U.M.= “KG“
Fam_Pai=“001“ Familia=“001001“ IVA=“5“ Data_Inicio=“2002/09/10“ Data_Validade=“ “ 
Moeda=“EUR“ Al_NAl_Tab_Taras=“6“ />
>
><item Codigo=“117768“ Descricao=“ANANAZ MADEIRA“ Preco=“1.12“ U.M.= “KG“ 
Fam_Pai=“001“ Familia=“001001“ IVA=“5“ Data_Inicio=“2002/09/10“ Data_Validade=“ “ 
Moeda=“EUR“ Al_NAl_Tab_Taras=“6“ />
>
>Look at the field "U.M." and to what happens when i use xmltocursor() to create the cursor "Cursor1":
>
>CODIGO	DESCRICAO	        PRECO	U	FAM_PAI
>117762	BANANAS IMPORTADAS	1.05		1
>117768	ANANAZ MADEIRA	        1.12		1
>				
>The code i used was:
>X = XMLTOCURSOR(m.caminho, "Cursor1", 1536)
>Where "m.caminho" it's a string with the name and location of the XML file.
>
>As you see the field "U.M." has disappeared from the cursor and became the field "U" with no data.
>
>Thank you,
>
>Joaquim
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform