Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems generating an XML using a XSD file
Message
 
À
10/05/2007 13:06:43
Markus Winhard
Lauton Software GmbH
Nürnberg, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01224215
Message ID:
01224291
Vues:
9
>Hi John,
>
>my first idea was to set loXmlAdapter.Tables[1].Fields[n].XMLName, but this property is read only. How about renaming the fields of your cursor in advance?
>
>SELECT FieldName1 AS XmlFieldName1, FieldName2 AS XmlFieldName2 ;
>  FROM c_empllist ;
>  INTO CURSOR c_empllist_for_xml
>
>
>HTH,
>
>Markus

Markus,
great idea except that I don't think I can have field names that long plus the element names are case sensitive. The only thing I have come up with so far is to do it myself with textmerge(). I wrote a little prg to strip the element names out of the XSD file into a VFP table. I can then add the field names from the cursor to the table records then generate text from the table records. The resulting text string can then be processed within a scan loop using textmerge to produce the xml output. It will take some tweaking but I think it should work.

I was just hoping there was a (much) easier way.
Many thanks for the idea though,
John.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform