0

I'm not exactly sure if it's called a header, but anyway, I'm using a serializer in C# to generate XML tags,

How do I remove the xml link that's stuck on my first tag, for example currently I have:

<FirstTag xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> testData

</FirstTag>

And this is the desired output:

<FirstTag> testData </FirstTag>
codedude
  • 1
  • 3
  • What have you tried? Do you know how to read an XML document into your program? You need to remove what I believe are called attributes. Basically, this is not a very well formed question. You need to find a tutorial on parsing XML. – Owen Ivory Jan 07 '16 at 08:11
  • xmlns stands for xml namespace. They are a type of attribute. You don't need to remove the namesapaces to parse the document. Why do you want to remove?. – jdweng Jan 07 '16 at 09:22
  • 1
    What serializer are you using? `XmlSerializer`? `DataContractSerializer`? Or something else? How are you calling it currently? – dbc Jan 09 '16 at 11:17
  • Possible duplicate of [How to serialize an object to XML without getting xmlns="..."?](http://stackoverflow.com/questions/258960/how-to-serialize-an-object-to-xml-without-getting-xmlns) – dbc Jan 09 '16 at 11:39

0 Answers0