3 Replies Latest reply on Feb 9, 2007 10:24 AM by shaunie123

    Ampersand

    shaunie123
      Hi,

      I am trying to write to an XML file and need to ensure that any ampersands are written as &

      Does Actionscript have a function to convert this?

      Thanks for your advice
        • 1. Re: Ampersand
          Ed682
          You can try surrounding the & code with cdata tags.

          <![CDATA[ bla bla bla &amp; bla bla bla ]]>
          • 2. Re: Ampersand
            shaunie123 Level 1
            Hi,

            Thanks for your reply, unfortunately I am building the XML dynamically and won't know if a string contains any ampersands. Therefore I need to convert the string with a function of somesort i.e.

            remove_ampersands(myString)

            any ideas?
            • 3. Re: Ampersand
              shaunie123 Level 1
              Hi,

              Thanks for your reply, unfortunately I am building the XML dynamically and won't know if a string contains any ampersands. Therefore I need to convert the string with a function of somesort i.e.

              remove_ampersands(myString)

              any ideas?