how to add xml namespces

Posted by Scott Kramer on Stack Overflow See other posts from Stack Overflow or by Scott Kramer
Published on 2009-05-29T20:58:43Z Indexed on 2010/05/07 23:58 UTC
Read the original article Hit count: 245

Filed under:
|
|
|

Hi:

This feed (snippit of it) needs to look exactly like this:

<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">

what do I add to this C# code to add that extra xmlns, xsi junk:

writer.WriteStartDocument();
writer.WriteStartElement("AmazonEnvelope");

this feed is rejected without it--

Thanks!!

© Stack Overflow or respective owner

Related posts about Xml

Related posts about namespaces