Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLTOCURSOR command
Message
De
08/10/2007 13:25:31
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01259486
Message ID:
01259497
Vues:
19
Thanks a lot... it worked!

>XMLTOCURSOR() is desined to load a simple XML created by CURSORTOXML() or similar. Here's a sample XML created by CURSORTOXML(). If you comapre it to your XML, you'll see that yours is missing root tag
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData>
>	<crstest>
>		<result>Test</result>
>	</crstest>
></VFPData>
>
>
>>First of all, I am using VFP 7.
>>
>>I have a simple XML file:
>>
>>
>><?xml version="1.0" encoding="UTF-8"?>
><VFPData>
>><results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="c:\vfp\ka\runtime\results.xsd">
>>	<result>Test</result>
>></results>
></VFPData>
>>
>>
>>Here is the schema:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>	<xs:element name="results">
>>		<xs:complexType>
>>			<xs:sequence>
>>				<xs:element name="result" type="xs:string"/>
>>			</xs:sequence>
>>		</xs:complexType>
>>	</xs:element>
>></xs:schema>
>>
>>
>>I am trying to import the XML file into a cursor with the following command (assume the text of the XML file is already in the variable cText):
>>
>>XMLTOCURSOR(cText,"TEST")
>>
>>
>>I get the error: Unable to infer XML schema.
>>
>>What do I need to do to make this work? Thanks!!!
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform