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

  • SEARCH
  • Home
  • 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 1080409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:01:32+00:00 2026-05-16T22:01:32+00:00

I am reading attempting to load XML from a ByteArray as follows: var xmlString:String

  • 0

I am reading attempting to load XML from a ByteArray as follows:

var xmlString:String = myByteArray.readUTFBytes(numBytes);
var myXML:XML = new XML(xmlString);

When I do that, I receive the following runtime error on the XML constructor when I run in Flash Player 9:

TypeError: Error #1088: The markup in the document following the root element must be well-formed.

This error message doesn’t occur in Flash Player 10. I can use the debugger to verify that the XML looks well-formed. The XML is in UTF-8.

  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-05-16T22:01:32+00:00Added an answer on May 16, 2026 at 10:01 pm

    The solution to this particular problem for me was that there was an unnecessary Byte Order Mark at the very beginning of the file, which I had to remove. Upon inspecting the file with a hex editor, I saw the following as the leading bytes in the file:

    EF BB BF

    The Flash Player 9 runtime apparently has a problem with this Byte Order Mark on a UTF-8 file, which is unnecessary since there is no byte ordering in UTF-8, as opposed to UTF-16 and UTF-32. Flash Player 10 has no problem with this leading Byte Order Mark.

    That explains, why this other blog entry documents that the following solution worked for them:

    xmlString = xmlString.substr(1);
    

    That particular solution didn’t quite work for me, since it shifted the runtime error to Flash Player 10 users, instead of Flash Player 9 users. Since we had control of the XML input, we could simply modify that, but if the XML came from a source we didn’t control, I suppose we could have tested the ByteArray for the leading BOM, and skipped it as shown above.

    Several blog entries were helpful in confirming that the BOM was the problem, such as this entry, in which a commenter states that his solution to the same 1088 runtime error was:

    For me the problem was XML saved in UTF with BOM.

    Also, this other blog entry provided more confirmation of the same problem occurring in Java:

    When dealing with a UTF-8 encoded RSS feed, this three-byte pattern (0xEF 0xBB 0xBF) in >the prolog can cause all sorts of interesting XML parsing problems

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

Sidebar

Related Questions

Hey. I am reading in a string from a file and attempting to use
I am currently reading Intermediate Perl from O'Reilly and am attempting to to do
Was reading through some text and playing around with attempting to write past the
Have been reading about async and tasks and been attempting to convert the CopyFileEx
Reading the docs, I'd expect $(#wrap2).remove(.error) to remove all .error elements from #wrap2 .
I'm attempting to learn some flex/bison, and I'm reading Flex & Bison by John
So I'm attempting to create a Befunge interperter and reading a text file into
I'm attempting to implement a random number generator system; essentially I'm reading in an
I'm attempting to use boost::format, where my formatting string is the HTML below. I
I'm attempting to setup Ruby on Rails on IIS7. I've been reading lots of

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.