The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Programmatically generated XML makes everything UPPERCASE

posted under category: ColdFusion on March 21, 2007 at 1:00 am by MrNate

A little problem I thought I'd share very quickly today. I was modifying an XML file in ColdFusion, adding attributes to some nodes, then later on XMLSearch()ing for nodes with these new attributes. Well, long story short, node.xmlAttributes.code="abc" will output <node CODE="abc"> And, you guessed it, XPath is always case sensitive.

The solution is to either fix your XPath queries (umm, sucks?), or write your xml attributes like so: node.xmlAttributes["code"]="abc"

Too old to comment!
On Mar 26, 2007 at 1:00 AM Jeremy Rottman (rottmanj who really likes said:
Don't you just hate that. I was working on a RETS system about a month ago. And fell right into this same issue.

At some point, I do how that adobe will have better support for xml and xml related objects. Until then, there are a few UDF's that do the trick.
Too old to comment!