XML Writing "<" or ">" AKA < or >
Hi there,
How do I write a less than or greater than symbol to an xml file? The code works but the resulting XML file contains the named character entity reference in place of the less than or greater than sign.
I need the xml to refer to Cascading Style Sheets. If we build the xml manually, everything works fine. We are trying to build a utility with AIR to create the xml for us, based on contents of fields on an AIR form. Everything works before we try to add "![CDATA[<p>" as the opening tag.
Out of despiration, we've tried a number of things. The latest is using variables to hold the strings we want to write as in what you see next:
var cDataStart:String = "![CDATA[<p>";
var cDataEnd:String = "</p>]]";
newElements.DragDropContainer.appendChild(<DragDrop><Labels name={Match}>{cDataStart+fileName+cDataEnd}</Labels><Targets image={png}value ={Match}></Targets></DragDrop>);
This results in this XML:
<DragDrop>
<Labels name="Match0">![CDATA[<p>label</p>]]</Labels>
<Targets image="image3.png" value="Match0"/>
</DragDrop>
Thoughts anyone?
Thanks
Pete H.
