Skip to content Skip to sidebar Skip to footer

How To Load PHP Dynamically Generated XML In FLASH

Question Updated for Bounty In Flash I need to load a dynamically generated XML file, which is created using PHP. I'm using the [Bulk-loader library][1] for all my loading. Current

Solution 1:

From your output:

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

It seems that the problem is not with the loader but with the PHP output. Check to make sure your output looks as expected by accessing the generated XML directly from your browser and downloading it. You may be able to spot the error in the output if you go through it in a text editor line-by-line, or you could try using an XML editor and see if it finds issues.


Solution 2:

Are you sure you have put type:"XML" within the add of bulkloader in your online test TEN.swf, since i have an error when running it from your PHP file ?

Edit:

Reading the bytecode from your previous TEN.swf show that the xml type was not put:

0x000076  [ 0xd0 ]       GetLocal0                                                                
0x000077  [ 0x66 ]       GetProperty          QName(PrivateNamespace(""), "theXML")                                                    
0x00007a  [ 0x2c ]       PushString           "id"                                                    
0x00007d  [ 0x2c ]       PushString           "xmldata"                                                    
0x000080  [ 0x55 ]       NewObject            1                                                    
0x000082  [ 0x4f ]       CallPropVoid         QName(PackageNamespace(""), "add"), 2                                                    

Now it seems to work and showing the bytecode show that the xml type was added

0x000076  [ 0xd0 ]       GetLocal0                                                                
0x000077  [ 0x66 ]       GetProperty          QName(PrivateNamespace(""), "theXML")                                                    
0x00007a  [ 0x2c ]       PushString           "id"                                                    
0x00007d  [ 0x2c ]       PushString           "xmldata"                                                    
0x000080  [ 0x2c ]       PushString           "type"        <===== here it is now                                            
0x000083  [ 0x2c ]       PushString           "xml"         <=====                                           
0x000086  [ 0x2c ]       PushString           "maxTries"                                                    
0x000089  [ 0x24 ]       PushByte             0x6                                                    
0x00008b  [ 0x2c ]       PushString           "preventCache"                                                    
0x00008e  [ 0x26 ]       PushTrue                                                                 
0x00008f  [ 0x55 ]       NewObject            4                                                    
0x000091  [ 0x4f ]       CallPropVoid         QName(PackageNamespace(""), "add"), 2                                                    

Solution 3:

try put this code in the first line of you php file:

header ("content-type: text/xml");

Post a Comment for "How To Load PHP Dynamically Generated XML In FLASH"