C# Corner
COMMUNITY: How to properly ask a question on Forums
Why Join Become a member Login
 
loading...
View All Comments
 
View All Messages
 
No unread notification. loading...
View All Notifications
 
C# Corner
Post
  • An Article
  • A Blog
  • A News
  • A Video
  • An EBook
  • An Interview Question
Ask Question
  •  
  • TECHNOLOGIES
  • ANSWERS
  • LEARN
  • NEWS
  • BLOGS
  • VIDEOS
  • INTERVIEW PREP
  • BOOKS
  • EVENTS
    • LIVE
  • CAREER
  • MEMBERS
  • JOBS
  • Training

Convert String to XML - .NET/C#

  • XAML Designer
  • Jan 04 2010
  • Resource
  • 0
  • 0
  • 95k
  • facebook
  • twitter
  • linkedIn
  • Reddit
  • WhatsApp
    • Email
    • Bookmark
  • expand
If you have a valid string in "str", you can use XmlDocument to load the string and then save string to an XML file using Save method of XmlDocument. Don't forget to import System.Xml namespace before using XmlDocument.

XmlDocument doc = new XmlDocument();
doc.LoadXml(str);
doc.Save("SSML.xml");     

TOP RESOURCES

  • WPF Button with Image
  • How to create a Grid in WPF Dynamically?
  • How to read and write binary data files in C#?
  • Automatically resize a Window to fit content in WPF
  • Convert String to XML - .NET/C#
  • How to play sound using C#
  • How to Add and Remove Items in a WPF ListBox
  • How to read files in a folder or Directory in C#?
  • How to use a SaveFileDialog in WPF
  • Close a Window in WPF

View All

MOST LIKED RESOURCES

  • Just Code : Code Analysis and Error Check
  • What Is New In TypeScript 2.0
  • Cross Platform Tinted Image
  • How to create a Grid in WPF Dynamically?
  • SQL Queries Interview Questions and answers
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms
  • Media Kit
  • Sitemap
  • Report a Bug
  • FAQ
  • Partners
  • C# Tutorials
  • Common Interview Questions
  • Stories
  • Consultants
  • Ideas
  • Certifications

©2023 C# Corner. All contents are copyright of their authors.