Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I determine field names via XLMadapter
Message
De
16/09/2005 15:37:25
 
 
À
16/09/2005 15:28:37
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01050475
Message ID:
01050478
Vues:
23
This message has been marked as the solution to the initial question of the thread.
Mike,

Try .Alias - yes, even for XMLField objects, that's the property you want.

Also note that there is an XMLName property with the same field name in Unicode, so it would have to be translated via STRCONV(). However, in some cases, the XMLName property can be used to point to a specific place in the XML document by using an XPath expression (and also setting XMLNameIsXPath property), so it's best to just refer to .Alias for the field name.

>I'm reading an XML file (with accompanying XSD) using the XMLAdapter. If I loop thru the fields in a table, I can get to each field's DataType and MaxLength properties. I'd like to determine the field's name. The following always returns an empty string:
>
>
>oXMLAdapter.Tables.Item(lnTable).fields.Item(lnField).Name
>
>
>What am I doing wrong? If I substitute DataType or MaxLength I get those values.
>
>Regards,
>
>Mike
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform