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.
Solved! Go to Solution.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies