>>I assume you're referring only to DataColumns of type string? AFAIK you would need to either .Trim() the values or replace with String.Empty at some point before calling WriteXML.
>
>Well, even if I replace in the table or in the dataset, because each character field is defined for a specific length, this will not change anything if I trim the value. Basically, it would be after DataSetToXml() would be done that I would have to parse the entire XML and trim where appropriate. But, this is a very difficult task. This is why I was hoping to have something at the WriteXML() level so it would be smart enough to avoid keeping spaces that are not needed.
Can't test right now but I don't think that you will be prevented from trimming - there's no minimum length for a DataColumn AFAIR. Did you try it?
I also thought of suggesting making the change after translation to XML and it shouldn't be that hard using XSLT (or maybe regular expressions) but doing it before it still simplest.
Regards,
Viv
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only