Thank's a lot. It works, the schema was the answer.
About tags, was a cool thing to mark reverserd words :)
>There's no info about element types in the XML created by CursortoXML with parameters you specify. CursortoXML "guesses" the type based on item values. For example, if you add third row into cursor
>INSERT INTO Foo VALUES ('A')
>than field type will be character in NewFoo. You can add inline schema to the XML CursortoXML which includes item type info.
>CursortoXML("Foo","lcXMLData", 1,0,0, "1")
>BTW, it's enough to use just < pre > and < /pre > tags for a code.
>>Hi Everybody, I'm using the functions XMLToCursor() y CursorToXML() to generate a COM Component, but I found a little problem with them:
>>
>>
>> CREATE CURSOR Foo (LeadingZero c(13))
>> INSERT INTO Foo VALUES('0090810490000')
>> INSERT INTO Foo VALUES ('0010200520001')
>>
>> ?VARTYPE(foo.leadingzero)
>> CursortoXML("Foo","lcXMLData")
>>
>> USE IN "Foo"
>>
>> XMLtoCursor(lcXMLData,"NewFoo")
>> ?VARTYPE(newfoo.leadingzero)
>>
>>
>> *** As u can see, the LeadingZero field now is a Numeric type.
>>
>>I can use PADL() to get back the field as a string (keeping the leading zeros), but I think there shoud be another way to get what I want, wich is, no conversion in field types. My question is: What am I doing wrong?,
>Sergey Berezniker
>Visual FoxPro MVP
>A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.
>Herm Albright