26
Jun
03

Creating case sensitive XML Attributes

There was a question on a mailing list today complaining that CFMX creates XML attributes as all capitals. The user would do something like this:

Which of course produces an XML document that looks like this:

The trick is to use the array access notation instead of dot notation. Once you do that, your case is preserved. This is a complete example.

")>


5 Responses to “Creating case sensitive XML Attributes”


  1. 1 Steven Erat Jul 30th, 2003 at 12:55 pm

    Sam,

    Great post, thanks! I think that this may have solved the problem for which I created an xmlsearchnocase() udf. There is a change in behavior when running CFXML_Blog on CFMX U3 vs running on the upcoming maintenance release where xmlattribute names were lowercased but are now uppercased while using the same code. When I isolated the block of code used to save blog entries the difference in behavior could not be reproduced, so the problem must lie somewhere deeper in the blogging app. My udf doubles the work by searching for both cases (ignoring mixed case possibilities) and then joining them into a single array for return. With the information from this blog entry, I realize that I can just ensure that all xml attrs are created with structure syntax, and that should eliminate the need for a double-duty udf.

    -Steve

  2. 2 daigoro Nov 22nd, 2004 at 7:55 pm

    hey, nice site, perhaps youd like to check out mine: daigoro

  3. 3 ambien Nov 23rd, 2004 at 8:06 pm

    Hey, interesting site, perhaps youd like to check out mine: ambien

  4. 4 Outsourced Switchboards Dec 4th, 2004 at 12:24 am

    Hi Guys

    Thanks for taking the time posting. MSN have finally launch blogs, what was with the delay?
    Outsourced Switchboards

    Cya
    Bruce

  5. 5 Caiek Feb 3rd, 2007 at 8:07 am

    So much spam (

Comments are currently closed.