C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » XML »

How to remove namespace attribute from a xml file ?


Posted Date: 22 Jul 2008      Posted By: Sajid P K      Member Level: Gold     Points: 1   Responses: 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/" ?

Do not forget to Rate the post...
Regards,
Sajid P K





Responses

Author: Sajid P K    23 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     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.

Do not forget to Rate the post...
Regards,
Sajid P K



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


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

About Us    Contact Us    Privacy Policy    Terms Of Use