Using C# and .NET to create XML

VBAHole22

Well-known member
Joined
Oct 21, 2003
Messages
432
Location
VA
I see a few websites dedicated to XML. I see some with tutorials about what xml is and how to write it in notepad. What I am looking for is a good resources (web, book, shouting at the moon) about how to create xml with .NET. There are a lot of methods available on the xmlwriter objects. I want to be able to create nice looking, well-formed xml.

The latest issue I am having is that the first tag in my retrun xmlDocument always has a "xmlns" attribute associated with it. I want to drop this but I cant figure out how. I had it on other elements in my document that I created the following way:

Code:
xmlWriter.WriteStartElement("Response",i.ToString());

But for those I simply dropped the last parameter in the method and it dropped the xmlns like so:

Code:
xmlWriter.WriteStartElement("Response");

But this doesnt work on the first element for some reason. I have:

Code:
xmlWriter.Namespaces = false;

So I know that aint it.

Any suggestions?
 
Back
Top