We help IT Professionals succeed at work.

flash xml content ' for '

cycledude
cycledude asked
on
Medium Priority
492 Views
Last Modified: 2012-03-13
Hi

I don't use flash very often, but I have a client who needs me to update his website and it is flash based, with xml as a flat 'database'...

Some of the content has apostrophes in it, which are being displayed as

'

is there a way around this?

I have just made sure the file format is utf-8, but still getting '

Cheers
Comment
Watch Question

Author

Commented:
in the meantime I have got around this by using a ` instead, i think it works as an apostrophe!
Top Expert 2009
Commented:
have a look at this old post.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XML/Q_25112873.html 

if that doesn't help then upload an example of you xml file and the snippet of code you're using to load the content.
Have you identified at which point the text gets HTML encoded?

It's best to try to produce your XML in the format you need rather than retro-fit a fix, but failing that, you can use these functions to add/remove HTML entities:

public static function htmlUnescape(str:String):String {
    return new XMLDocument(str).firstChild.nodeValue;
}
public static function htmlEscape(str:String):String {
    return XML( new XMLNode( XMLNodeType.TEXT_NODE, str ) ).toXMLString();
}

Open in new window

Author

Commented:
thanks for the replies, the client was happy with my improvisation! so I will leave it at that.

` instead of '

;o)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.