0 Replies Latest reply on Apr 26, 2010 1:35 PM by mumcs01

    Sending via XML with changeable tags

    mumcs01 Level 1

      I've been using the following very successfully to pass varialbes for an update via $_POST to a php:

       

      <mx:HTTPService id="sendtophp" url="http://10.101.50.60/update.php" useProxy="false" method="POST">
          <mx:request xmlns="">
           <key>{keytoinsert}</key><value>{valuetoinsert}</value>
          </mx:request>
      </mx:HTTPService>

       

      Works great. However instead of sending the format '<key>{keytoinsert}</key><value>{valuetoinsert}</value>' I want to send the key as the tag.

       

      e.g. <{keytoinsert}>{valuetoinsert}</{keytoinsert}>

       

      But this doesn't seem to work:

       

      <mx:HTTPService id="sendtophp" url="http://10.101.50.60/update.php" useProxy="false" method="POST">
          <mx:request xmlns="">
           <{keytoinsert}>{valuetoinsert}</{keytoinsert}>

          </mx:request>
      </mx:HTTPService>

       

      I get an 'invaid character or markup found in script block. Try surrounding your code with a CDATA block'

       

      Can anyone steer me in the right direction?