Today I finally tried using <cfxml> for the first time. However, when I tried using an element from the xml, it always have an empty space in front. Hmm…
<cfoutput>’#value#’</cfoutput>
At first I thought it is some CF quirks, so I tried
<cfprocessingdirective suppressWhiteSpace=”true”>
but the white space is still there somehow…
Then I tried putting a Trim() around the value, but the white space still there!!! What!?
Finally, I highlight the non-removable space, right-click, “view selection source” in Firefox, and THERE IT IS!
‘<myElement>xxx</myElement>’
Lesson learned. I needed to reference myElement.XmlText to get ‘xxx’.
If <cfdump> does a HtmlEditFormat() for the browser output… I guess I’ll have nothing to blog about today. :)

0 comments:
Post a Comment