Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Invalid name character in 'atom:link'. The ':' character cannot be included in a name >Thread Next - Re: Invalid name character in 'atom:link'. The ':' character cannot be included in a name Re: Invalid name character in 'atom:link'. The ':' character cannot be included in a nameTo: NULL Date: 9/11/2008 1:22:00 PM
// some statements wrapped for NNTP clarity...
XmlWriterSettings settings =
new XmlWriterSettings();
settings.CheckCharacters = true;
settings.CloseOutput = true;
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");
...
// W3C recommended usage for link element
#region Task: <link> element...
if (link.Length != 0)
writer.WriteStartElement("atom:link");
writer.WriteAttributeString("href", link);
writer.WriteAttributeString("rel", "self");
writer.WriteAttributeString("type",
"application/rss+xml");
writer.WriteEndElement();
#endregion
...
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Close();
}
"Martin Honnen" <mahotrash@y...> wrote in message
news:OpaDGSDFJHA.1460@T......
> Hillbilly wrote:
>> What? I have the atom namespace declared correctly and I'm wondering why
>> the XmlWriter has a problem with this element?
>
> Can you show us your exact code that gives the error?
>
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
