|
|
|
date: Thu, 11 Sep 2008 12:29:15 -0500,
group: microsoft.public.xml
back
Re: Invalid name character in 'atom:link'. The ':' character cannot
be included in a name
Hillbilly wrote:
const string atom = "http://www.w3.org/2005/Atom";
> using (XmlWriter writer =
> XmlWriter.Create(writerFileMapPath, settings))
> {
>
> writer.WriteStartDocument();
> writer.WriteStartElement("rss");
> writer.WriteAttributeString("version", "2.0");
>
> // Atom namespace
> writer.WriteAttributeString("xmlns",
> "atom", null,
> "http://www.w3.org/2005/Atom");
writer.WriteAttributeString("xmlns",
"atom", null,
atom);
> ...
> // W3C recommended usage for link element
> #region Task: <link> element...
> if (link.Length != 0)
> writer.WriteStartElement("atom:link");
Use
writer.WriteStartElement("atom", "link", atom);
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
date: Fri, 12 Sep 2008 14:33:55 +0200
author: Martin Honnen
Re: Invalid name character in 'atom:link'. The ':' character cannot be included in a name
Thank you Martin.
"Martin Honnen" wrote in message
news:uHPFUPNFJHA.616@TK2MSFTNGP06.phx.gbl...
> Hillbilly wrote:
>
> const string atom = "http://www.w3.org/2005/Atom";
>
>> using (XmlWriter writer =
>> XmlWriter.Create(writerFileMapPath, settings))
>> {
>>
>> writer.WriteStartDocument();
>> writer.WriteStartElement("rss");
>> writer.WriteAttributeString("version", "2.0");
>>
>> // Atom namespace
>> writer.WriteAttributeString("xmlns",
>> "atom", null,
>> "http://www.w3.org/2005/Atom");
>
> writer.WriteAttributeString("xmlns",
> "atom", null,
> atom);
>> ...
>> // W3C recommended usage for link element
>> #region Task: <link> element...
>> if (link.Length != 0)
>> writer.WriteStartElement("atom:link");
>
> Use
> writer.WriteStartElement("atom", "link", atom);
>
>
>
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
date: Fri, 12 Sep 2008 10:07:46 -0500
author: Hillbilly
|
|