Solved

flash xml content ' for '

Posted on 2012-03-13
4
449 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
0
Comment
Question by:cycledude
  • 2
4 Comments
 

Author Comment

by:cycledude
Comment Utility
in the meantime I have got around this by using a ` instead, i think it works as an apostrophe!
0
 
LVL 39

Assisted Solution

by:blue-genie
blue-genie earned 250 total points
Comment Utility
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.
0
 
LVL 12

Accepted Solution

by:
Proactivation earned 250 total points
Comment Utility
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

0
 

Author Closing Comment

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

` instead of '

;o)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now