The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Programmatically generated XML makes everything UPPERCASE

posted under category: ColdFusion on March 20, 2007 at 8: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 25, 2007 at 7:00 PM Jeremy Rottman (rottmanj who can't believe it's not gmail.com) 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!