A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: content-type: application/xml

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Location
    SF Bay Area
    Posts
    8

    content-type: application/xml

    I have a perl script printing out the XML data back to flash. Is it necessary to set the content-type?

    Code:
    content-type: application/xml
    How would this code fit into the structure of the XML data? Where would I place it in this code:

    PHP Code:
    <?xml version="1.0" ?>
    <confirmation>
    <phone>5551212</phone>
    <message>hello</message>
    <status>success</status>
    </confirmation>
    Thanks!

  2. #2
    New Title:
    Join Date
    Jul 2002
    Posts
    87
    content-type is information the web server provides to the web browser about the file it is returning. It lives in a sort of invisible part of the transfer that the browser strips out before displaying the page. It doesn't go inside of the XML document.

    Scripts written in perl or other languages need to have the content-type set, because you can't tell by looking at the name of a script what kind of information it is giving you. For example, a plain HTML file is usually named with an .html or .htm suffix, but a perl script might be named "getuserinfo" and it might return HTML code. But it could also return xml, or even code for a jpeg image.

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