Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSetToXml() and trimming fields
Message
De
07/04/2008 03:37:47
 
 
À
06/04/2008 16:32:16
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01308460
Message ID:
01308651
Vues:
9
>>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
Fil
Voir

Click here to load this message in the networking platform