dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: & Hell!

  1. #1
    Junior Member
    Join Date
    Feb 2004
    Location
    Earth
    Posts
    9

    & Hell!

    All I need to do is create a text node without the character '&' being written as '&'!

    I know that Flash automatically encodes several characters to their HTML equivalant, but I don't need it to...

    Anyone?
    Treat others how you would like to be treated. Buy them a beer and talk about football all night!

  2. #2
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    I don't beleive that an ampersand by itself in the XML is valid (not 100% sure).

    Where are you having problems with this, if it is displaying data in flash then flash has an encode and unencode functions that will sort this out.

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  3. #3
    Junior Member
    Join Date
    Feb 2004
    Location
    Earth
    Posts
    9
    Thanks Tupps...

    Basically I am trying to write the '&' into a textNode of an XML object that I am dynamically generating.

    I am writing a Flash app that forms a WISIWIG editor as part of a content management system...

    I have an engine that 'parses' a string and builds an XML document from it.

    I have had no end of problems with special characters, as the XML is displayed in a website that uses UTF-8 encoding, the only character that I really needed to appear as it should was an ampersand, from here I could then encode like so '$' = '#' etc etc

    This is all because Flash doesn't support the construction of CDATA in textNodes.

    To get around this problem I have had to create my special characters as nodes with an id attribute that I then unencode using the server side XSLT.

    Therefore my XML looks something like this...

    [CODE]{paragraph}This is an {SpChr id="#0038;"/} ampersand{/paragraph}[CODE]

    Not the prettiest of XML pages but it seems to work.

    When are Macromedia going to expand the XML object in Flash to include CDATA support?x
    Last edited by r2dtwo; 02-04-2004 at 11:21 AM.
    Treat others how you would like to be treated. Buy them a beer and talk about football all night!

  4. #4
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    I am not sure about the expansion of the XML system in flash. It has pretty much remained stable since flash 5. The main thing that changed was the speed but that was due to internal changes in the text processing system of Flash MX which flowed into the XML nodes.

    I have a feeling that the XML support might stay where it is in case it draws people away from there high server offerings. At present apart from a few little bugs the XML is pretty good system.
    Flash-XML FAQ
    http://www.tupps.com/flash/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