Information générale
Catégorie:
Bases de données
Versions des environnements
>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement