Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 can't figure out how. I had it on other elements in my document that I created the following way:

 

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

 

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

 

xmlWriter.WriteStartElement("Response");

 

But this doesn't work on the first element for some reason. I have:

 

xmlWriter.Namespaces = false;

 

So I know that ain't it.

 

Any suggestions?

Wanna-Be C# Superstar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...