Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I determine field names via XLMadapter
Message
From
16/09/2005 15:37:25
 
 
To
16/09/2005 15:28:37
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050475
Message ID:
01050478
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform