Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xmladapter toxml write tags in uppercase
Message
De
20/11/2007 11:00:57
 
 
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 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01269907
Message ID:
01270177
Vues:
17
>Check Re: How to generate XML with fieldnames in uppercase ? Message #885508.
>I think SP2 allows to change names in place.

Thanks Sergey! It works like a charm :o)
		FOR itables = 1 TO oxa.Tables.Count
			oxt = oxa.Tables.Item(itables)
			FOR ifields = 1 TO oxt.fields.Count
                                *--Unicode
				lcFieldName = STRCONV(oxt.Fields.Item(1).xmlname,10)
                                *--Convert the fieldname to upper case cannot update the prop yet
				lcFieldName = UPPER(lcFieldName)
				oxf = oxt.Fields.Item(1)
                                *--View the properties of the field
				?oxf.alias
				?oxf.codepage
				?oxf.datatype
				?oxf.disableEncode
				?oxf.fractiondigits
				?oxf.isattribute
				?oxf.isbase64
				?oxf.isbinary
				?oxf.isattribute
				?oxf.keyfield
				?oxf.maxlength
				?oxf.nocptrans
				?oxf.unicode
				?oxf.wrapincdata
				?oxf.xmlname
				?oxf.xmlnameisxpath
				?oxf.xmltable
				?oxf.xmltype
				?oxf.xsdfractiondigits
				?oxf.xsdmaxlength
				?oxf.xsdtotaldigits
				?oxf.xsdtype
                                *--Remove the field from the collection
				oxt.fields.remove(1)
                                *--Update the field name to uppercase
				oxf.xmlname = STRCONV(lcFieldname,5)
                                *--Add the field back into the collection
				oxa.Tables(itables).Fields.Add(oxf, oxf.xmlname)
			ENDFOR
		ENDFOR
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform