Parsing RSS 1.0 with ColdFusion MX

April 08, 2004

Well thanks to Sean Corfield I understand why I was having issues with namespaces when trying to parse RSS 1.0 with XPath.

If you have a document with namespaces such as RSS 1.0, you need to fully qualify name spaces in your XPath queries, such as: /rdf:RDF/ - that makes sense, but what I didn't realize is that you still need to qualify the namespaces, when namespaces are used in the document for elements using the default namespace, such as item: /rdf:RDF/:item/.

Check out the ColdFusion RSS Feed Parser by Foundeo

Related Entries

2 people found this page useful, what do you think?


, it doesn't mean that every little XML dunmoect needs to be namespaced, if it remains private enough.As for XPath, I consider the difficulties in the use namespaces with XPath to be a weakness in XPath, one that causes me a regular amount of pain. I don't consider it a weakness in the way XML does namespaces. XPath is a convenient nuisance at any time; it's text format is short and convenient, but the fact that it's text and not XML sometimes makes it inconvenient. Not having anywhere to put namespace declarations is one side effect of the textual format. Still, would it be *so* hard to provide an extra parameter somewhere to allow the namespaces to be specified?With XSLT, it becomes a nuisance that there isn't an easy way to pass the namespace prefix to URI mappings into a script. If you could, it would certainly make XSLT transformations more robust with respect to namespace URI changes.Cheers, Tony.

Recent Entries


did you hack my cf?