views:

245

answers:

3

I have an XSL file I am loading in flash that includes the following snippet:

<xsl:text>&#x2022;</xsl:text>

I load it this way:

_root.brochure_xsl = new XML();
_root.brochure_xsl.onLoad = function() {
    _root.SendPdfXml();
}
_root.brochure_xsl.ignoreWhite = true;
_root.brochure_xsl.load(_root.appSettings.XmlDataLocation +"xml/brochure.xsl");

On the event, I trace the results like such:

send_lv.XslContent = _root.brochure_xsl.toString();
trace(send_lv.XslContent);

In the result trace, it converts the snippet to a bullet.

<xsl:text>

*

</xsl:text>

I want it to stay the encoded, is this possible?

+1  A: 

This is certainly an encoding issue. The toString() method is suspect, but you have to check. Can you dump the contents of the XML character-by-character.

dirkgently
+1  A: 

What if you encode it twice in the XML:

<xsl:text>&amp;#x2022;</xsl:text>
David
too much of a hack : \
Shawn Simon
I wouldn't say this is a hack. Your code is doing exactly what you are telling it to do. As soon as your XML is parsed, the entity is decoded into the matching unicode character, then your XSL just prints on that character.
David
hrmmmm..........
Shawn Simon
A: 

Fixed by not using the XML object. Instead just used a URL Loader.

Shawn Simon