FILE ID: /techblog/181_Programmatically-generated-XML-makes-everything-UPPERCASE/ Mar 21, 2007

Programmatically generated XML makes everything UPPERCASE

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"