Thanks, that worked fine.
"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:ez9HCZR9FHA.500@TK2MSFTNGP15.phx.gbl...
>
>
> Kal wrote:
>
>> I found some sample code to construct an rss feed and am trying to modify
>> it to match Google's specs at:
http://www.google.com/base/rss_specs.html,
>> but without knowing much about XML.
>
> If you want to create an element in a namespace with the DOM in .NET then
> use a namespace aware method e.g.
> rssDoc.CreateElement("prefix:localname", "namespaceURI")
> or e.g.
> rssDoc.CreateElement("prefix", "localname", "namespaceURI")
>
> If you want to create an attribute in a namespace with the DOM in .NET
> then use a namespace aware method e.g.
> elementNode.SetAttribute("localname", "namespaceURI",
> "attribute value")
> or e.g.
> attributeNode = rssDoc.CreateAttribute("prefix:localname",
> "namespaceURI");
> attributeNode.Value = "attribute value";
> elementNode.SetAtttributeNode(attributeNode);
>
> You usually do not have to create xmlns attributes in the DOM as the
> serializer will add them when serializing nodes properly created as shown
> above. However if you want to add an xmlns attribute then make sure you
> use e.g.
> atttributeNode = rssDoc.CreateAttribute("xmlns:prefix",
> "
http://www.w3.org/2000/xmlns/");
> attributeNode.Value = "namespaceURI";
> as the namespace URI for the xmlns prefix is predefined as
>
http://www.w3.org/2000/xmlns/. >
> --
>
> Martin Honnen --- MVP XML
>
http://JavaScript.FAQTs.com/