Created
April 3, 2015 17:13
-
-
Save Microsofttechies/37b2dd3103f98fc3f490 to your computer and use it in GitHub Desktop.
C# XML read and remove namespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| XmlDocument xmlD = new XmlDocument(); | |
| xmlD.Load("C:\\a.xml"); | |
| string strxml = xmlD.OuterXml.ToString(); | |
| Regex regEx = new Regex(@"< \?xml.*?\?>"); | |
| strxml = regEx.Replace(strxml, " "); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment