F
fzhang
I am relatively new to XML and C#. So, forgive me if this question is
too newbie.
While assuming this is an easy programming task, I couldn't find a
single reference anywhere for how to do it. Here is the situation:
I am given an XML file like the one below from other group in my
company to load the data into our database.
<root xmlns="the-namespace">
....
data here...
....
</root>
I was able to load the file into an XmlDocument object and then into db
tables only when I removed 'xmlns="the-namespace'. However, if I
didn't remove it, The dataset in the XmlDocument was empty and there
was no exception thrown. I'd like to find a way of programmatically
removing the xmlns attribute. BTW, the namespace in the file was not
referenced anywhere in the XML document.
Thanks in advance.
Frank
too newbie.

While assuming this is an easy programming task, I couldn't find a
single reference anywhere for how to do it. Here is the situation:
I am given an XML file like the one below from other group in my
company to load the data into our database.
<root xmlns="the-namespace">
....
data here...
....
</root>
I was able to load the file into an XmlDocument object and then into db
tables only when I removed 'xmlns="the-namespace'. However, if I
didn't remove it, The dataset in the XmlDocument was empty and there
was no exception thrown. I'd like to find a way of programmatically
removing the xmlns attribute. BTW, the namespace in the file was not
referenced anywhere in the XML document.
Thanks in advance.
Frank