Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Error #1088

Avatar

Level 1

Hi,

I'm trying to build a simple app which fetch data from a MYSQL database. I'm using WHAM server and PHP is the connecting code, although I'm writing the PDP code, flex is.

Using Flex 3, i created a connection between app and the database.

However, it showed an error # 1088.

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

Did understand the reason.......when searched about it.......got maximum post about the same error with XML. That's the reason posting again.

THanks

H.R.

1 Accepted Solution

Avatar

Correct answer by
Level 1

Instead of using the XML class, trying storing your results in an XMLList

Error #1088 occurs when you try to convert a string to XML and the string itself is invalid XML. For XML to be valid, it should consist of one root node that may or may not contain other nodes or just text. If there is a chance your string might contain multiple (root) nodes without a parent node wrapped around them, then use the XMLList class instead.

So instead of

     var yourVar:XML = XML(yourString);

use

     var yourVar:XMLList = XMLList(yourString);

It took me 5 days of trying all sorts of crazy things to resolve that error and finally this was the solution I needed.

View solution in original post

2 Replies

Avatar

Former Community Member

You should examine what is coming back from your PHP call. It is likely either nothing is coming back, or a simple string is coming back instead of XML, or the XML is malformed.

Sometimes you need to wrap simple strings in PHP code to avoid this. So if your PHP has $result = "error occurred";  then change it to something like $result = "<error>error occurred</error>";

If this post answers your question or helps, please mark it as such.

Avatar

Correct answer by
Level 1

Instead of using the XML class, trying storing your results in an XMLList

Error #1088 occurs when you try to convert a string to XML and the string itself is invalid XML. For XML to be valid, it should consist of one root node that may or may not contain other nodes or just text. If there is a chance your string might contain multiple (root) nodes without a parent node wrapped around them, then use the XMLList class instead.

So instead of

     var yourVar:XML = XML(yourString);

use

     var yourVar:XMLList = XMLList(yourString);

It took me 5 days of trying all sorts of crazy things to resolve that error and finally this was the solution I needed.