toString not generating valid XML

The code you set up is what I’m doing. Thank you for confirming the
behavior. I’ll report the bug and patiently wait for someone to fix it …
and find a work-around while I’m waiting.On Saturday, August 15, 2015 at 9:36:16 AM UTC-5, Adam Cameron wrote:

On Saturday, 15 August 2015 00:10:34 UTC+1, Marilou Landes wrote:

There is a difference between the ACF10 toString( value ) output and
Lucee toString( value ) output when the value is XML. I’ve attached a
simple HTML document that is read using xmlParse( ). I’ve also attached 2
additional files, that reprersent the output from ACF10 and Lucee (FINAL
4.5.2.007).

You didn’t include code to demonstrate how you’re processing the HTML
file, which is pretty key to this.

However this will do it:

dir = expandPath(“./”);
platform = structKeyExists(server, “lucee”) ? “lucee” : “coldFusion”;
xml = xmlParse(“#dir#before.html”);
fileWrite(“#dir##platform#.xml”, toString(xml));

Running that on CF11 and Lucee 4.5, I am seeing the same thing you are.

Suggestions for resolving this?

  1. File a bug.
  2. Await someone to fix it, or
  3. Fix it yourself.

Lucee’s XML parsing just doesn’t seem to work in this situation.


Adam