11 Replies Latest reply on Oct 28, 2010 4:25 PM by Flex harUI

    Problem parsing XML with namespaces

    msucena-oEE8Tt

      Dear Adobe Community,

       

      I am having a difficult time resolving, and actually understanding why this is a problem.  Here are the details.

       

      I have a Java Web Service that is returning XML data to Flex.  I have recently added namespaces to my XML because I am now programatically validating this XML against an XSD Schema document.  Before added these namespaces Flex was quite happy with the XML and parsed it with no problems, but since adding the namespaces I am always getting an "Error #1088: The markup in the document following the root element must be well-formed" Flash run-time error as soon as Flex starts parsing the XML with a namespace.  My XML is still well-formed so if there is a problem with namespaces than this error message is quite misleading.  Below I will give an example of what the old and new XML looks like.

       

      Old XML:

      <parent>

           <child>

                <grandchild>

                     <greatgrandchild/>

                </grandchild>

           </child>

      </parent>

       

      New XML:

      <parent xmlns="http://www.parent.com/Parent">

           <child>

                <grandchild xmlns="http://www.grandchild.com/Grandchild"/>

                     <greatgrandchild/>

                </grandchild>

           </child>

      </parent>

       

      Does anyone have any insight into the actual problem, if there even is one?  Please let me know if posting some actual code would be of better use.  Thank you for your cooperation in this matter.

       

      Sincerely,

      Mike Sucena

      Software Engineer