Ok, I have asked a similar question in the SQL 2005 section. This question is similar but it pertains to VB.net and not SQL 2005.
Ok I have an xml file I need to generat for a 3rd party. I have an empty shell of an xml file. All I want to do is add some nodes to one of the child nodes.
I want the xml to look like this
Thats all I want.....Because that is what the 3rd party XML Documents look like. They do have the xmlns stuff up in their root nodes
I have tried this below and it fails...but if this command worked it would do all I need
Dim title As XmlElement = doc.CreateElement("tns:TPO")
If all my elements could look like the above line of code that would be great...but it errors out. If you remove the colon it works fine but then the document is missing the required colon.
There is some code I am omitting here but if you need it I will supply it.
Any Ideas? I can't figure out a normal way to do this. I can think of an abnormal way to do it....
Dim title As XmlElement = doc.CreateElement("tnsTPO")
Then do some code to open and search the xml document for the string "tnsTPO" and replace it with "tns:TPO"
Any ideas? I don't want any new additional xmlns stuff in these xml elements....because the 3rd party spec only has it on the root node and all other nodes only contain the "tns:" part.