C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...









How to remove namespace attribute from a xml file ?


Posted Date: 22 Jul 2008      Total Responses: 1

Posted By: saji       Member Level: Gold     Points: 1


hii,

<?xml version="1.0" encoding="US-ASCII" ?>
<doc xmlns="http://rtf2xml.sourceforge.net/">
<preamble> </preamble>
<body></body>
</doc>

from above XML. How we will remove attribute xmlns="http://rtf2xml.sourceforge.net/" ?




Responses

Author: saji    23 Jul 2008Member Level: GoldRating:     Points: 4
hii..

At last i got the Code for remove namespace attribute from a xml file.
[CODE}

XmlDocument d = new XmlDocument();
using (XmlTextReader tr = new XmlTextReader("C:\\input.xml"))
{
tr.Namespaces = false;

d.Load(tr);

}


d.Save("C:\\output.xml");



thx.





Post Reply
You must Sign In to post a response.
Next : What is XSD in xml
Previous : convert .dae file into .3ds file
Return to Discussion Forum
Post New Message
Category: XML

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

Help Desk

Contact Us    Privacy Policy    Terms Of Use