Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Probelm with toXML:

Status
Not open for further replies.

FoxLearner

Programmer
Aug 29, 2002
93
US
Hi All
I am having a problem with the toXML method of XMLAdapter. When I use it, it is truncating the tags to a max length of 10 characters. The original schema has some tags with a size of more than 10. toXML is generating the XML files with all tags truncated to size 10, and funniest thing is it is editing the XSD file and truncating the tags in the schema file too.
Can you please tell me how can I rectify it?

Thanks and Regards
FoxLearner
 
FoxLearner

This is untested since you didn't post any code to test with, but if I read the help files I notice the XSDmaxLength property, and the help file says:
Property Values
Character data type. XSDmaxLength specifies the XSD maximum number of units of length.

Remarks
When generating XML using the XMLAdapter ToXML method, you can set this property to specify the maxLength restriction in the XSD schema. You might need this behavior when the maxLength value required for the schema differs from what Visual FoxPro would otherwise calculate. Visual FoxPro does not perform validation in this situation; therefore, you need to make sure the data conforms to the restrictions imposed by maxLength.




Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top