Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

XmlSerializer and bloated formatted XML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Per - 20 Jan 2007 21:32 GMT
I'm using the XmlSerializer to serialize an object to an xml file. When
I look at the file I see that the xml produced is nicely formatted for
a human eye. It has line breaks and indentations (as series of white
spaces). Unfortunately all these formatting niceties aren't free. An
xml that would normally take ~33Mb takes ~58Mb. So here's my question:

Is there an option to make XmlSerializer produce tight xml with no line
breaks or indentations?

P.S. Using the framework 1.1
Michael Per - 21 Jan 2007 04:39 GMT
Found the solution, Please disregard.

> I'm using the XmlSerializer to serialize an object to an xml file. When
> I look at the file I see that the xml produced is nicely formatted for
[quoted text clipped - 6 lines]
>
> P.S. Using the framework 1.1
Laurent Bugnion [MVP] - 21 Jan 2007 09:17 GMT
Hi,

> Found the solution, Please disregard.

It's usually a good practice to post the solution when one finds it.
This avoids that others have to ask again, they can then find the
solution in the NG's archives.

Greetings,
Laurent

>> I'm using the XmlSerializer to serialize an object to an xml file. When
>> I look at the file I see that the xml produced is nicely formatted for
[quoted text clipped - 6 lines]
>>
>> P.S. Using the framework 1.1

Signature

Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.