Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 106277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:34:17+00:00 2026-05-11T01:34:17+00:00

I have an XML object that I want to send to my player via

  • 0

I have an XML object that I want to send to my player via HTTP POST. This is all good when using XML.sendAndLoad.

The problem is that when the XML object I generate contains CDATA, the CDATA is stripped out before the POST occurs.

so if I have:

var xml:XML = new XML('<root><tag><![CDATA[hello]]></tag></root>')   

when I do a sendAndLoad this is what gets POSTed:

<root><tag>hello</tag></root> 

the same occurs when I try to create the XML using XMLDOM methods like createElement, createTextNode, and appendChild.

the AS2 docs say that CDATA is not supported. Is there a workaround for this? I’m thinking that it could be fixed by extending and overriding the XML class, but I haven’t found a way to do it yet.

Thanks!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:34:18+00:00Added an answer on May 11, 2026 at 1:34 am

    This is the expected behavior. CDATA is substituted by the XML parser at the time it builds its tree. What is sent is a serialization of the tree, sans the CDATA.

    If you want to send raw XML source you have to send it as pure string data.

    BTW I fail to see how it can be a problem here, since both are semantically identical, i.e. ‘<![CDATA[hello]]>’ and ‘hello’ give the same string. CDATA is just a quoting syntax, not significant markup. However there can be a problem if the CDATA contains special characters. You will have to quote them properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to send an xml document that i have created using jdom api.
I'm working with SOAP using the javax.xml.soap package. I have a javax.xml.soap.SOAPMessage object that
I have an xml string below that I've turned into an object using $content
I have several xml files that are formated this way: <ROOT> <OBJECT> <identity> <id>123</id>
We have HTTP webservices that are RPC. They return XML representing the object the
I have written some code that loads an XML document using an XmlDocument object
I have a simple XML document that I want to read into an object
I have a link from that link: http://api.maxxiscentral.com/maxxiscentral/GetTyrePatterns from this link i want to
I have XML file of object.I want to get instance of that object.But i
I have an XML document that has been created using utf-8 encoding. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.