Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding the XML preserve syntax
Message
De
30/04/2006 13:14:47
 
 
À
30/04/2006 13:11:21
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
01117317
Message ID:
01117908
Vues:
16
>And one more thing ... the behavior seems to still be dependent on whether your database column's datatype is char or varchar. If you use varchar and your column is truly empty (no extra spaces), you won't see the xml:space="preserve" get added to the XML. But if your column is char, then it's never really empty ... it's always padded with spaces no matter what you do and so you'll get the stuff added to the XML. This is how it works in SQL Server anyway, I'm not sure if it's different or not for other databases.

Is VarChar the equivalent in C# than String in VB.Net?

Also, do you know why having spaces in a field would make the XML to react like that? In Excel, this is created an additional field and this is totally not related.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform