|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
remove xml file namespace attributeI want to remove xml namespace attribute (xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance") in the following file <AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Table1> <Data1> 10 </Data1> <Data2> 20 </Data2> <Data3> 40 </Data3> <Table1> </AutoData> So finally the file without namespace is like this: <AutoData > <Table1> <Data1> 10 </Data1> <Data2> 20 </Data2> <Data3> 40 </Data3> <Table1> </AutoData> Any advice? Thanks Martin martin1 wrote:
> I want to remove xml namespace attribute Note that the sample markup you post is not even well-formed XML. You > (xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance") in the following file > > <AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <Table1> > <Data1> 10 </Data1> > <Data2> 20 </Data2> > <Data3> 40 </Data3> > <Table1> ^^^^^^^^ need a </Table1> there. As for removing that attribute assuming the XML is well-formed and has been loaded into an XmlDocument instance as shown earlier you can do e.g. Xml_Document.DocumentElement.RemoveAttribute("xsi", "http://www.w3.org/2000/xmlns/")
Learning OOP conceptual question
Iterating through a Hastable of objects Problem Adding and Using Resource Files update database through SQL script Passing values to another web page Re-size label text how to capture enter key without affrecting copy paste kcust keys max length for tooltip remove xml file root tag Debugging UserControl |
|||||||||||||||||||||||