A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: xml character question

  1. #1
    relax, I wont sting!
    Join Date
    Jul 2000

    xml character question

    Hey all. Quick question for you. I'm importing a bunch of xml that was gathered from a few forms posted online. One of the problems that we had with the xml was that people were putting in strange characters (well, things xml/flash didnt like) such as < and > and accented letters etc. This left flash reading xml files with extra <> characters, which royally screwed everything up. So I had the xml guy do something about it, and he said he escaped/trapped/something'd them. So now instead we have "what brand &lt;are you?&gt;" instead of "what brand <are you?>" in the xml files.

    My question then, is how do I get flash to parse that &gt; into a > symbol for displaying in text fields, or upon the initial xml importing?

    Another case is an entry that in the xml is now: &amp;#8216;Mesh Light&amp;#8217; and &amp;#8216;Copper Wire Basket&amp;#8217;

    I have no idea what it originally was, but I'm betting it needs to be parsed somehow. I tried unescape() with this, I seem to be looking in the wrong direction.

    Any help much appreciated

  2. #2
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Ask your XML guy how he escaped it. the escape/unescape are fairly standard functions for changing text to/from valid XML, but if he hasn't escaped the XML the same way flash does it is not going to unescape properly.

    The 'proper' solution to this problem is to put the data entered by people into CDATA tags in the XML.


    Flash-XML FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center