.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Remove WhiteSpce from XML File

Posted By: Narayanan     Posted Date: December 13, 2012    Points:5   Category :C#
Hi All ,
How to Remove Whitespace from XML Tag in XML File in C#.net?

Responses
Author: Akhil Raj       [Moderator]      
Posted Date: December 13, 2012     Points: 20   

use LIN query to avoid whitespaces between xml tags

XElement.Parse(str).ToString(SaveOptions.DisableFormatting)


Check the following articles also

http://neilkilbride.blogspot.in/2008/04/removing-xmldocument-white-space-c.html
http://7explications.wordpress.com/tag/remove-whitespace-from-xml-in-c-net/


Author: Narayanan             
Posted Date: January 01, 2013     Points: 20   

Hi,
Thanks for Code.But It doesn't work.

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend