March 5, 2010

Some days I wish I was not a programmer.
MyFeed = XmlNew();
MyFeed.xmlRoot = XmlElemNew(MyFeed, "rss");
MyFeed.rss.XmlAttributes.version = "2.0";
In ColdFusion, this creates the XML tag:
<rss VERSION="2.0">
Which invalidates the RSS feed, because attributes must be declared in lowercase.
...
MyFeed.rss.XmlAttributes["version"] = "2.0";
Works, of course, creating the XML tag:
<rss version="2.0">
Hmph. The things you waste 15 minutes on and then blog about (wasting 15 more).

No comments: