I have the classic XmlTextReader problem where I need to process the tag as a whole as well as child within it. So what I did was this:
AllRD = New XmlTextReader(New StringReader(XMLString.Trim())) ' an entire file
Do While AllRD.Read()
... loop until I find the tag I'm interested in ...
CellXML = AllRD.ReadOuterXml()
CellRD = New XmlTextReader(New StringReader(CellXML.Trim()))
Do While CellRD.Read()
... stuff ...
This lets me parse the inner XML with Read
and still access the entire tag when I get to the bottom of the loop. So now I feed it this string:
<c r="A1" s="2" t="s"><v>0</v></c>
and when I examine CellXML
I get this:
<c r="A1" s="2" t="s" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><v>0</v></c>
Anyone know how to make that new xmlns
go away?