Kiran's personal website
Blog    Forums   Sitemap   Social    Phone

Knowledge base home, and site home.
List of all Knowledge base categories.
An alphabetical list of technical terms.
Contact Me
Contact me for knowledge base questions
My Blog
My articles, white papers, ideas and thoughts.


Replacing or removing characters in XmlDocument

Date Added July 23, 2010 | Print | Bookmark

//Replace or remove characters from the XmlDocument
private void ReplaceCharsInXml(XmlDocument xmlDoc, string toReplace, string replaceWith){
    String xmlString = GetXmlString(xmlDoc);
    xmlString = xmlString.Replace(toReplace, replaceWith);

private string GetXmlString(XmlDocument xmlDoc){
    StringWriter sw = new StringWriter();
    XmlTextWriter xw = new XmlTextWriter(sw);
    return sw.ToString();

Was this article helpful?

Yes No

Category: C#.NET - XML

Last updated on July 23, 2010 with 4165 views


Home | About Me | Products | Support | Contact | Knowledgebase | Forums | Blog | Site map | Site Search | Subscribe | Links | Social | News

Travel | Guest Book | All Pages | History | Site Calendar | Recipes | Ex-Rates | UK Stuff | Downloads | Telugu Stuff | Tell a Friend | Feedback

Bookmark and Share
Terms of Use
Site contents Copyright © 2008-2009 Kiran Reddy. All rights reserved.