xml - Actionscript stripping whitespace when it shouldn't -


I am using a URL loader in the Action Script project to read in some XML. I then process it, and put it in a text field. Everything looks fine though, I do not really have to exterminate XML from my SWF so I did this:

  var internal XML: XML = & lt; Content & gt; & Lt; P & gt; This & lt; City & gt; Paris & lt; / City & gt; That I did before & gt; Activity & gt; Walking in nature & lt; / Activity & gt; & Lt; / P & gt; & Lt; / Content & gt;  

That is, I have taken the same XML and put it directly into my action script on the XML object instance. I then run the same exact process. But at this time, the white space between any XML tag content and plain text has been stripped

The text field is read in the above: "It was in the punctate, I had already awakened in nature . "

In both cases I got the XML. I also tried XML PerttyPrinting = No help at all.

Does anyone know what is happening?

Perhaps whotspace trimming time is not being compiled, so timing is not done (hence XML.IgnoreWhitespace Ineffectiveness of)

To preserve XML Verbatim till runtime (like it was before when you were loading it), just put it in a string:

var InternalXML: XML = XML ("Content" >>

Paris & lt; / City & gt; which I took before & lt; activity & Gt; Walking in Nature & lt; / Activity & gt ;. & lt; / P & gt; & lt; / content & gt; ")


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -