Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor to XML using existing xml schema XSD
Message
De
08/03/2002 11:08:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00629808
Message ID:
00630240
Vues:
23
Yuri,

If you initially create your cursor with CURSORTOXML() and use your existing XML schema, then the resultant XML created with XMLTOCURSOR() should reflect your schema.

I assume that you've tried it and it's not working correctly? Could you tell us what is happening?

~~Bonnie



>Mark,
>
>Thank you for the replay.
>If you have a cursor, then CURSORTOXML() creates an XML and a schema that is internally generated for this XML. But what I need is quite different. I need either:
>- if I have a cursor and an external schema (which I can not change), then how to generate a XML without replacing this schema, or;
>- if I have a schema, then how to generate a suitable cursor that would be updated in VFP and then translated to XML keeping existing schema.
>
>
>>I can create an xml doc. with a schema using VFP CURSORTOXML().
>>
>>Mark
>>
>>>Could anybody provide an example how to create a XML document from a cursor/table using existing xml Schema XSD file?
>>>
>>>For examle, there is a table:
>>>testtable (author c(25), subject c(25), content M, dt_created T, cost n(10,3), currency c(20))
>>>
>>>And the schema is:
>>>*-------------------------------------------
>>>(?xml version="1.0"?>
>>>
>>>(Schema name="XMLTEST" xmlns="urn:schemas-microsoft-com:xml-data" (xmlns:dt="urn:schemas-microsoft-com:datatypes">
>>>(description>
>>> Describes the schema for direct data update .
>>>(/description>
>>>(ElementType name="author" content="textOnly" dt:type="string"/>
>>>(ElementType name="subject" content="textOnly" dt:type="string"/>
>>>(ElementType name="content" content="textOnly" dt:type="string"/>
>>>(ElementType name="timeStamp" content="textOnly" dt:type="dateTime"/>
>>>(ElementType name="currencyUnit" content="textOnly" dt:type="string"/>
>>>(ElementType name="costValue" content="textOnly" dt:type="number"/>
>>>(ElementType name="note" content="eltOnly">
>>>(element type="author" minOccurs="1" maxOccurs="1"/>
>>>(element type="subject" minOccurs="1" maxOccurs="1"/>
>>>(element type="content" minOccurs="1" maxOccurs="1"/>
>>>(element type="timeStamp" minOccurs="1" maxOccurs="1"/>
>>>(/ElementType>
>>>(ElementType name="Cost" content="eltOnly">
>>>(element type="currencyUnit" minOccurs="1" maxOccurs="1"/>
>>>(element type="costValue" minOccurs="1" maxOccurs="1"/>
>>>(/ElementType>
>>>(/Schema>
>>>*----Please replace starting "(" with "<" above.
>>>*Sorry, entire message is not displayed otherwise.--------------------
>>>
>>>I will appreciate any input or advice
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform