Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding the XML preserve syntax
Message
De
28/04/2006 20:27:41
 
 
À
28/04/2006 20:18:52
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
01117317
Message ID:
01117732
Vues:
18
Wow, that's pretty strange ... I've never seen WriteXml() do that. I thought maybe it was something different about defaults in VS2005, but I tried it in 2005 and it still didn't use that syntax.

I wonder what's causing it? You're not using the XmlWriteMode, are you? (not that that should matter, but I don't typically use that parameter).


~~Bonnie


>>It just dawned on me what you were saying about this ... you purposely have put the "preserve" syntax in your XML, correct? Well, of course you'll get the column in Excel, because that's the purpose of that syntax ... to preserve white space (the syntax is actually xml:space="preserve"). If you didn't purposely put that syntax in there, you must have done something other than a simple DataSet.WriteXml() because that will not use that syntax.
>
>This syntax has been put in there by WriteXml(). This is why I am wondering why it is doing that. The field is a one space length. The WriteXml() will put it like that. The only way to avoid that is to Trim() the loRow("Field1"), for example, and that will do it.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform