Warnings about root element must be well-formed

Hey, I just downloaded and am getting running with FlexMetrics.  I'm running this from the ant taskdef.  When I run it, I get what looks to be valid and fine XML reports generated, but I also get a bunch of warnings, each of which reads:
[flex-metrics] Oct 25, 2010 11:54:00 AM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify [flex-metrics] WARNING: The markup in the document preceding the root element must be well-formed. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Error HandlerWrapper.java:195) [flex-metrics] com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrappe r.java:174) [flex-metrics] com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav a:388)
The taskdef element is pretty standard:
<taskdef name="flex-metrics" classname="com.adobe.ac.pmd.metrics.ant.FlexMetricsAntTask" classpath="${flexpmd.libs}/flex-pmd-metrics-ant-task-${flexpmd.version}.jar">
    <classpath>
        <pathelement location="${flexpmd.libs}/flex-pmd-files-${flexpmd.version}.jar" />
        <pathelement location="${flexpmd.libs}/flex-pmd-metrics-${flexpmd.version}.jar" />
        <pathelement location="${flexpmd.libs}/as3-plugin-utils-${flexpmd.version}.jar" />
        <pathelement location="${flexpmd.libs}/as3-parser-${flexpmd.version}.jar" />
        <pathelement location="${flexpmd.libs}/as3-parser-api-${flexpmd.version}.jar" />
        <pathelement location="${flexpmd.libs}/commons-lang-2.4.jar" />
        <pathelement location="${flexpmd.libs}/flex-pmd-ruleset-api-${flexpmd.version}.jar" />
        <pathelement location="${flexpmd.libs}/pmd-4.2.5.jar" />
        <pathelement location="${flexpmd.libs}/dom4j-1.6.1.jar"/>
    </classpath>
</taskdef>
References to this look like this:
<flex-metrics sourcedirectory="${home.project}\src" outputfile="${deploy.dir}/metrics/project.javancss.xml" />
So I'm not doing anything weird or crazy with it.  I get that error message repeated 42 times.  I can't really seem to correlate that number with anything in my project, i.e. we've got more than 42 mxml files (59 of them), we've got more than 42 AS3 files, etc.  So I'm not really sure what it's hitting 42 times to come up with that error.
Any ideas on what this might indicate would be greatly appreciated!

My working theory is that it chokes on instances of the Vector Object (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Vector.html) but I have yet to verify that conclusively.

Similar Messages

  • The markup in the document following the root element must be well-formed.

    I have my XML root element that looks like this:
    <DataResponseOfListOfSite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www
    .w3.org/2001/XMLSchema" xmlns="http://xxxxxx/webservices/sites/">
    and I get the error "The markup in the document following the root element must be well-formed."
    If I use this it works fine:
    <DataResponseOfListOfSite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www
    .w3.org/2001/XMLSchema" xmlns:xsi="http://xxxxxx/webservices/sites/">
    Does anyone know why I have to have the xmlns:xsi="" instead of just xmlns=""
    If I paste this XML into any validator, it says that its good, so I dont know why Flex is complaining about it.

    In the first one you have two namespaces both with the same prefix.
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" and xmlns:xsi="http://xxxxxx/webservices/sites/"
    Thanks,
    Gaurav Jain
    Flex SDK Team
    http://www.gauravj.com/blog

  • The markup in the document preceding the root element must be well-formed

    Hi,
    Each time I add some library, something serious happens to my NetBeans5.5 and Tomcat 5.5.17. This time I added jsf-facelets.jar and now nothing is being deployed. I m getting following exception
    javax.servlet.ServletException: Error Parsing /Dept.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)
    Is there any special procedure to follow to add libraries?
    Plz help.

    Facelets is XHTML. XHTML is XML-HTML. XML require strict well-formness of the tags. I.e. every tag should be correctly nested and closed.
    I would say, read the Facelets Developer Documentation: http://www.google.com/search?q=facelets+developer+documentation

  • Xsl:include msg - document following root element must be well-formed

    I am getting the following message when I try to execute a transaction that takes an XML file & transforms it.  The message is:
    "[ERROR]: XSLTransform error: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed."
    The transaction loads an xml input file, and then transforms it.  The transformation stylesheet does some formatting to the xml.  The stylesheet has an include in it that adds an element to the output. 
    Input XML data
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowset>
        <Row>
            <ItemNo>00000000001884304</ItemNo>
            <ItemDesc>Test Item Description</ItemDesc>
        </Row>
    </Rowset>
    Expected output:
    <?xml version="1.0" encoding="UTF-8"?>
    <Item>
        <Items ItemDesc="Test Item Description" RawItemNo="00000000001884304" dotties="...................." editedItemNo="1884304" supernova="**********" />
    </Item>
    If I point the <xsl:include to a web folder on a test box, it will read & translate the data into the expected output.  However, when I have both the initial stylesheet and the include stylesheet in the same Web folder in MII, I get the above message.  If the URL is any different, it generates an IO error. 
    The initial stylesheet is
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:output method="xml" />
    <xsl:include href="http://myserver:myport/XMII/CM/foldername/testcalls_2.xsl"/>
    <xsl:variable name="wrkitem" select="//ItemNo"/>
    <xsl:template match="Row">
         <xsl:call-template name="RowEdit"/>
    </xsl:template>
    <xsl:template name="RowEdit" match="Row">
          <Item>
         <xsl:element name="Items" use-attribute-sets="RowChange">
               </xsl:element>
           </Item>
    </xsl:template>
    <xsl:attribute-set name="RowChange">
         <xsl:attribute name="RawItemNo">
               <xsl:value-of select="//ItemNo"/>
         </xsl:attribute>
         <xsl:attribute name="editedItemNo">
              <xsl:call-template name="removeLeadingZeros">
                   <xsl:with-param name="originalString" select="$wrkitem"/>
              </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="ItemDesc">
                   <xsl:value-of select="//ItemDesc"/>
         </xsl:attribute>
         <xsl:attribute name="dotties">
              <xsl:call-template name="dots">
                         <xsl:with-param name="count" select="20"/>
                  </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="supernova">
              <xsl:call-template name="stars">
              </xsl:call-template>
         </xsl:attribute>
    </xsl:attribute-set>
      <xsl:template name="dots">
            <xsl:param name="count" select="1"/>
          <xsl:if test="$count > 0">
            <xsl:text>.</xsl:text>
            <xsl:call-template name="dots">
              <xsl:with-param name="count" select="$count - 1"/>
            </xsl:call-template>
          </xsl:if>
      </xsl:template>
    <xsl:template name="removeLeadingZeros"> 
      <xsl:param name="originalString"/> 
      <xsl:choose> 
        <xsl:when test="starts-with($originalString,'0')"> 
          <xsl:call-template name="removeLeadingZeros"> 
            <xsl:with-param name="originalString"> 
              <xsl:value-of select="substring-after($originalString,'0' )"/> 
            </xsl:with-param> 
          </xsl:call-template> 
        </xsl:when> 
        <xsl:otherwise> 
          <xsl:value-of select="$originalString"/>
        </xsl:otherwise> 
      </xsl:choose> 
    </xsl:template>
    </xsl:stylesheet>
    and the stylesheet being called by the xsl:include -
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template name="stars" match="Item">
    <Stars>
         <xsl:element name="BBB">
              <xsl:text>**********</xsl:text>
         </xsl:element>
    </Stars>
    </xsl:template>
    </xsl:stylesheet>
    FYI, both of the stylesheets above are in the same folder on the WEB tab in MII.  The full name (properties tab) is:
    foldername/WEB/Test/stylesheet.xsl
    Also, I am able to browse & view each of them in IE.  The url they are at is:
    http://server:port/XMII/CM/foldername/test/stylesheet.xsl
    Both stylesheets appear to be well-formed.
    If I use any other syntax other than the full URL, the error it generates is an IO Exception on the included stylesheet.  The markup message above makes me believe that it is at least attempting to handle the included stylesheet. 
    In the Link editor of the xsl Transformation Incoming tab, there are two assignments being made.
    1.  Transform property
    object= xsl_transformation_0
    property=Transform
    expression="db://foldername/WEB/Test/stylesheet.xsl" (this is the initial, not included stylesheet)
    Link type=Assign Value
    2.  Input property
    object= xsl_transformation_0
    property=Input
    Expression=testitems_0.XmlContent
    Link type=Assign XML
    Running MII 12.0
    Thoughts?  Any input appreciated.

    In the first one you have two namespaces both with the same prefix.
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" and xmlns:xsi="http://xxxxxx/webservices/sites/"
    Thanks,
    Gaurav Jain
    Flex SDK Team
    http://www.gauravj.com/blog

  • The markup must be well-formed.

    Hi,
    I am beginer in SAX and Java.
    I am tring to read Information from not well formed XML File.
    When I try to use SAX or DOM Parser then I have this error:
    The markup in the document following the root element must be well-formed.
    My XML File looks like this:
    <format type="filename" t="13241">0;W650;004;AG-Erzgeb</format>
    <format type="driver" t="123412">001;023</format>
    Can I force SAX or DOM to parse not well-formed XML files?
    Thank you for your help.
    Haythem
    Edited by: Haythem on Mar 23, 2010 3:52 AM

    Thank you it helps.
    I used ByteArrayInputStream and InputStream to add <root>... </root> for the file on the fly and it is well formed now.
    String rootB ="<wrapper>";
         String rootE= "</wrapper>";
         Vector<InputStream> v = new Vector<InputStream>();
         byte[] bArray = rootB.getBytes();
         byte[] eArray = rootE.getBytes();
         ByteArrayInputStream baisB = new ByteArrayInputStream(bArray);
         ByteArrayInputStream baisE = new ByteArrayInputStream(eArray);
         InputStream fisFile = new FileInputStream(file);
         v.addElement( baisB );
         v.addElement( fisFile );
         v.addElement( baisE );
         InputStream combined = new SequenceInputStream(v.elements());
            Document doc = docBuilder.parse (combined);....
    Edited by: Haythem on Mar 25, 2010 4:15 AM
    Edited by: Haythem on Mar 25, 2010 4:17 AM
    Edited by: Haythem on Mar 25, 2010 4:18 AM

  • TLD Error:The markup in the document preceding the root element must...

    Hello, I am new to using the Tag Libraries, i am getting the following error which seems to be in my treeTag.tld file, I am pasting the error message and the treeTag.tld at the bottom of this message. Any help is much appreciated.
    Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: XML parsing error on file /TreeTag/treeTag.tld: (line 5, col 1): The markup in the document preceding the root element must be well-formed.
         at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:218)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:283)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:219)
         at ***************************************************
    Here is my treeTag.tld file
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    - <taglib>
         <tlibversion>1.1</tlibversion>
         <jspversion>1.1</jspversion>
         <shortname>Tree taglib</shortname>
         <uri>http://www.servletsuite.com/servlets/treetag</uri>
         <info>Tree tags</info>
         - <tag>
              <name>createTree</name>
              <tagclass>com.cj.tree.createTree</tagclass>
              <bodycontent>JSP</bodycontent>
              <info>Creates HTML-based tree view</info>
         </tag>
         - <tag>
              <name>addNode</name>
              <tagclass>com.cj.tree.addNode</tagclass>
              <bodycontent>JSP</bodycontent>
              <info>adds node</info>
              - <attribute>
                   <name>code</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
         </tag>
    </taglib>
    Regards,
    Navin Pathuru.

    You might make sure - if you havent already - that you are using the must up to date jsp version

  • Geting a "must be well-formed" error in a JSP

    I have a JSP file and it compiles and runs just fine, but JSC gives me the following error:
    There are errors in the project.
    You must resolve these problems.
    results.jsp:1: The markup in the document preceding the root element must be well-formed.
    on this line in the JSP (Line 1 of file)
    <%@page import="com.phonebook.User" %>
    Not sure why or how to fix it or what JSC is expecting...

    <%@page import="com.phonebook.User" %>
    should be after the root element declaration
    and the syntax for xml is<jsp:directive.page import="className"/>
    or import=package.Class

  • XML Problem - Markup not well-formed? (kinda long)

    Hello, I'm working on my first AIR app and I've run into a bit of a snag.  The app is intended to allow users of our system to create a Word document, save it as XML, and then load it into the AIR app and have some manipulation performed to extract data, and finally store the data in a database.  The reasons for this app to exist are pretty irrelevant for the particular problem that I'm having, but a little background on my development efforts might help shed light on my situation, and with luck one of you might be able to help me figure this out.
    I started on this app using the URLLoader and URLRequest objects to load a Word document saved as XML from a server.  This worked fine, I created logic to distinguish between Word 2007 and Word 2003 XML formats and using the E4X XML and XMLList objects I was able to load that XML into an XML object, change it to a string, grab the document body, strip out namespaces and such (formatting is mostly irrelevant here too, only the actual data is of importance) amd eventually get a much simpler XML object or list that contained just the data relevant to the purpose at hand.  This was all working fine, I managed to get both Word XML formats to process as I wished and spit out new XML that will serve as the basis for another application that we run.  Great! 
    The problem was that in order to use this method in a distributed way I needed to have the original Word documents accessible to the code, which meant having the user upload their Word file (saved as XML) and then retrieving it with the URLLoader and URLRequest.  I actually implemented this method using the FileReference object in AS3 and using some simple PHP code to store the file in a server directory that was accessible to the client.  Unfortunately, this lead me to thinking about the security issues involved and how allowing PHP to write to a directory would open it to potential malicious attacks, yada yada yada, you all know the issues.  So I thought that I might be able to read the file before uploading it in the kind of circular logic that sometimes happens.  When I started into the AS3 docs to check on classes to help, I realized that my initial suspicions were correct and that in order to load and read the file locally, I could use AIR, have the user load up their XML file, process it and then send the resulting XML and info to the database directly (eliminating the need to send files to the server AND preventing the need to allow PHP to write to the server in this instance).
    So after a bit of reading and testing, I managed to modify my FLA to publish an AIR file, and started debugging.  My Word 2007 document worked fine - I create a File object and a FileStream object and they are easily able to access the file the user selects via the File.browseForOpen method.  I then run the processing code, which begins by creating an XML object from the data read from the file.  What's happening now is that while the Word 2007 document loads and processes without an issue, the Word 2003 document is causing a 1088 error: The markup in the document following the root element must be well-formed.
    I don't understand why this is happening since the same document in the same format was able to be loaded into an XML object when I used the URLLoader to grab the file.  The only thing I can conclude is that somehow the FileStream.readUTFBytes() method is somehow causing an issue.  I am able to trace out what is being read, but the file is lengthy and I haven't completed my analysis to see if and where the changes are occuring.
    If anyone has any experience with this type of situation, I'd really appreciate hearing about it.  Thanks in advance for any help you can provide.

    OK, it turns out that for some reason the Word 2003 XML document was being read with an extra character preceding the actual markup.  By dumping the stream into a string and then clipping the first character I was able to get the app running again.  Thanks for taking the time to read this thread! 

  • Document not well formed

    Hi-
    one of the things i liked about java is it had a stack trace
    that went to the moon and it helped
    you find where your error is.
    if i run my code in PHP IDE it is well formed enough and
    spits out the right result.
    If i upload it to my webhost set to shared environment it
    keeps coming up document not well formed.
    I dont really understand what code causes this message as
    there is no line number.
    I tried to make sure my xml started with the xml tag and had
    a root and closing tags.
    Does flex 3 offer any more insight with diagnostic messages
    as to where the problems may
    surface from? the message seems to indicate "url loader on
    complete" .
    where would you look if you got a url loader on complete?
    i am really stuck. it is frustrating to see it work in php
    and then not on the web host :-)
    (error msg. below)
    thanks for any assistance,
    jim
    [RPC Fault faultString="Error #1088: The markup in the
    document following the root element must be well-formed."
    faultCode="Client.CouldNotDecode" faultDetail="null"]
    at mx.rpc.http::HTTPService/
    http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\dev\enterprise_bali\framewo rks\mx\rpc\http\HTTPService.as:856
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\dev\enterprise_bali\framewo rks\mx\rpc\AbstractInvoker.as:165
    at
    mx.rpc::Responder/result()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:48]
    at
    mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest. as:82]
    at
    DirectHTTPChannel.as$139::DirectHTTPMessageResponder/completeHandler()[C:\dev\enterprise_ bali\frameworks\mx\messaging\channels\DirectHTTPChannel.as:359]
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    Hi-
    i think i found out why i couldnt get my code to work. the
    local machine had different things enabled that werent
    enabled on the web host for PHP. i asked the admin to enable
    PHP 5 includes the XSL extension by default and can be
    enabled by adding the argument --with-xsl[=DIR].
    it looks suspicious.
    thanks,
    jim

  • XML from CF not well-formed?

    I have been working through the Training from the Source book
    on Flex2 (Trapper, Boles, Talbot, etc.). In Lesson 17, it deals
    with accessing server-side objects.
    One piece of code accesses a CF template, which brings in an
    XML file:
    <mx:HTTPService id="prodByCatRPC"
    url="
    http://localhost/flexGrocer/xml/categorizedProducts.cfm"
    result="prodByCategoryHandler(event)"
    resultFormat="e4x" />
    The CF plate from the book's file has the following:
    <cfheader name="Expires" value="#now()#" />
    <cfxml variable="xProducts">
    <cfinclude template="categorizedProducts.xml">
    </cfxml>
    <cfset xmlObject=ToString(xProducts)>
    <cfcontent type="text/xml" />
    <cfoutput>#variables.xmlObject#</cfoutput>
    When run the Flex file, I get a run-time message which seems
    to indicate that the XML is not well-formed. (Here is a bit of the
    message; not sure I'm understanding it!):
    [RPC Fault faultString="Error #1088: The markup in the
    document following the root element must be well-formed."
    faultCode="Client.CouldNotDecode" faultDetail="null"]
    I am ASSUMING that the CF page is not returning the xml as
    desired, because if I simply change the flex http service call to
    the xml file that the CF page is including, the flex app runs as
    expected and without errors:
    url="
    http://localhost/flexGrocer/xml/categorizedProducts.xml"
    (something in the posting mech is making the above url
    statement messed up, but you can probably tell what I mean)
    I am a CF developer and although haven't used the book's
    exact method to get the cf generated xml, I have done so
    successfully for Spry and other things.
    I tried some ot the things I had to do to get the CF
    generated xml to work in Spry with this flex, but didn't help.
    Tried adding a reset='true" with the cfcontent tag; tried making
    the cfcontent wrap the output; added cfprocessing tags to
    suppresswhitespace.
    Appreciate any thoughts/help on how to solve this. Also,
    whether others agree that the problem is with the generated xml
    rather than something else.
    Thanks
    Keith

    I don't remember the exact context when I first posted this
    question and answered it; but, if one doesn't want to change
    overall settings for debugging in cf admin., I *think* you can
    ajust for a specific area using cfsetting and/or
    cfprocessingdirective. There's a number of attributes and
    combinations there that I think can take care of the problem. I
    forget for sure, but may want to try that, especially on a
    development box where you might generally want debugging to be on.
    Also, if using cfcs in any part of what you generate, they
    can produce whitespace. To solve (or minimize), make sure that
    output attribute in the component is false and that output in
    function is false (unless directly outputting within the function.
    Seems like CF and whitespace is an ongoing item to try to
    manage.
    Keith

  • Help! Flash error: 1088 (Markup in doucment not well-formed)

    I'm trying to use ASP.NET to retrieve data from the sql server, place in inside an xml and sends the xml to flash to display the data.
    However, I'm getting
    TypeError: Error #1088: The markup in the document following the root element must be well-formed.
    at news_fla::mainTimeline/loaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    This is my code:
    ASP.NET
    =======
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim adapter As SqlDataAdapter
            Dim ds As New DataSet
            Dim sql As String
            Dim con As New SqlConnection("data source = GN80000798-0\SQLEXPRESS2008; initial catalog = EL; integrated security = true")
            sql = "select * from news"
            Try
                con.Open()
                adapter = New SqlDataAdapter(sql, con)
                adapter.Fill(ds, "data")
                con.Close()
                Response.ContentType = "text/XML"
                Response.HeaderEncoding = Encoding.UTF8
                ds.WriteXml(Response.OutputStream, XmlWriteMode.WriteSchema)
                MsgBox("Done")
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try
        End Sub
    Flash
    ====
    import flash.xml.*;
    var newsrequest:URLRequest = new URLRequest("http://localhost:1179/DB/DB.aspx"); //ASP.NET development server
    var newsloader:URLLoader = new URLLoader();
    var newsxml:XML;
    var dvar:URLVariables = new URLVariables();
    dvar.dummy = "dummy";
    newsrequest.data = dvar;
    newsrequest.method = URLRequestMethod.POST;
    newsloader.load(newsrequest);
    newsloader.addEventListener(Event.COMPLETE, loaded);
    titlenews.autoSize = TextFieldAutoSize.LEFT;
    bodynews.autoSize = TextFieldAutoSize.LEFT;
    function loaded(event:Event){
    newsxml = new XML(event.target.data);
    newsxml.ignoreWhitespace = true;
    trace(newsxml);
    HOWEVER, if i replace the
    "ds.WriteXml(Response.OutputStream, XmlWriteMode.WriteSchema)"
    with
    "ds.WriteXml("C:\new.xml")
    it works. But i dont wan a .xml file residing in the server. so i hope that the .xml file would be cleared off as soon as the request is done.
    Did i do something wrong?
    PS: I don't know if i post this in the correct section but since it's related to AS3, thats why i post it here. sorry if i made a mistake.

    Please paste the following line as first statement in loaded function, also compare the output of the following line with expected output from ASP page.
    trace(event.target.data);
    The error is causing due to the fact that XML received is not well formed.
    I guess the problem is with write XML you are getting some additional tag elements and these are not wellformed. so flash is giving error.

  • Xjc throwing exception that "document not well formed"

    I have the following DTD file given in the sample code saved as item.dtd
    <?xml version='1.0' encoding='utf-8'?>
    <!-- Simple DTD -->
    <!ELEMENT item_list (item_info*)>
    <!ELEMENT item_info (name, price)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT price (#PCDATA)>
    and the following xjs file as given in the sample code
    saved as item.xjs
    <xml-java-binding-schema>
    <element name="item_list" type="class" root="true"/>
    <element name="item_info" type="class"/>
    </xml-java-binding-schema>
    now from command prompt when I run the following command, it throws the following error.
    c:\Some-folder\ xjc item.dtd item.xjs
    the EXCEPTION thrown is :
    The markup in the document preceding the root element must be well-formed. line 4 of item.dtd
    The FULL TRACE is(if anybody is interested to see).. PLEASE HELP ME OUT.
    Thanks
    Gagan
    TRACE STARTS HERE:
    parsing a schema...
    The markup in the document preceding the root element must be well-formed.
    line 4 of item.dtd
    Exception in thread "main" ::file:///C:/RBML/xml-java/item.dtd:file:///C:/RBML/x
    ml-java/item.dtd:file:///C:/RBML/xml-java/item.dtd:4:3:The markup in the document preceding the root element must be well-formed.

    NO i dont think so..
    as you could see the code pasted in the first instance. the only diffrence is that you are using double quotes.(I tried that as well)
    I hope you are referring to item.dtd file not item.xjs file
    Thanks
    Gagan

  • Xjc ,dtd, xjs giving problem "document not well formed"

    I have started the thread again.
    Anyway.
    I have an item.dtd file (same as in sample tutorial).. I have reduced some components to simplify..when it was not working
    item.dtd file:
    <!ELEMENT ITEM (NAME)>
    <!ELEMENT NAME (#PCDATA)>
    item.xjs file:
    <xml-java-binding-schema>
    <element name="ITEM" type="class" root="true"/>
    </xml-java-binding-schema>
    when i run from command prompt:
    C:\RBML\xjc item.dtd item.xjs
    It throws up an error
    The markup in the document preceding the root element must be well-formed. line 1 of item.dtd
    I am not able to understand the error..how it can be rectified.
    PLEASE HELP..!
    I have tried adding the following line to item.dtd but doesnot work
    <?xml version="1.0" encoding ="utf-8"?>
    I had also tried removing redundant spaces and blank lines.
    PLEASE HELP
    Thanks
    Gagan

    I'm have done the same for schemas.But giving the error as
    "[ERROR] Unexpected <xml-java-binding-schema> appears at line 1 column 26
    line 1 of item.xjs"
    my xjs file is
    "<xml-java-binding-schema>
    <element name="item_list" type="class" root="true"/>
    <element name="item_info" type="class"/>
    </xml-java-binding-schema>"
    andmy schema is
    "<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="item_list">
    <xsd:complexType>
         <xsd:sequence>
              <xsd:element name="item_info" maxOccurs="unbounded">
                   <xsd:complexType>
                        <xsd:sequence>
                             <xsd:element name="name" type="xsd:string"/>
                             <xsd:element name="price" type="xsd:decimal"/>
                        </xsd:sequence>
                   </xsd:complexType>
         </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>".
    Pls help me

  • Sax and well-formed exception

    Hello,
    I get some xml sent to me. The xml is malformed this is what the whole file looks
    like.
    <rc>0</rc><message>Batch received successfully</message>
    When i try to parse this with sax I get the exception...
    [Fatal Error] :1:12: The markup in the document following the root element must be well-formed.
    I cant really modify the xml , so is there a way I can get sax to ignore the error and parse the file anyway?
    Thanks,
    jd

    Yes , the documentation they gave me said they will send me XML :p I guess other users
    use their service(and have automated systems relying on this busted format) so they will not change the format. I really don't want to use a regex or some other string parsing method , as every other message
    I get from their service is well-formed XML. So , I have looked at the features and properties list at the saxproject page , and I don't see anything I can enable/disable to make this message fly :p So...
    any suggestions , should I parse this message using some other method?
    Thank You,
    Jason Davis

  • Error using XML Loader: XML not well-formed

    Hi all,
    I am facing a problem using the XML loader in xMII 12.0 when trying to load the following XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Users>
      <User>
        <UserID>IMXOO</UserID>
        <CWID>IMXOO</CWID>
        <Prename>Michael</Prename>
        <Surname>Otto</Surname>
        <CreatedOn>2001-12-31T12:00:00</CreatedOn>
        <CreatedBy>IMXOO</CreatedBy>
      </User>
    </Users>
    I also tried a most basic XML file which shows the same error:
    <?xml version="1.0"?>
    <ausgabe>
      <anzeige>Testausgabe</ausgabe>
    </ausgabe>
    To my understanding both files are well-formed, however xMII shows the error:
    "The markup in the document following the root element must be well-formed."
    Do I break any rules concerning the markup? IE loads the files without showing any errors.
    Best Regards
    Michael

    Jeremy,
    again you gave the key to the solution. When the error occured, I have set up the following path within the xMII workbench:
    "Catalog-Tab"
    <server>
      > Sandbox
            > XML
                myFile.xml
    When I tried to load the mxFile.xml with the XML Loader, I got the error described above (XML not well-formed). I also cannot drag the file into a transaction in the workbench. I have manually configured the XML Loader with "http://<server:port>/XMII/CM/Sandbox/XML/mxFile".
    Now using your hint I have changed to the "Web-Tab":
    "Web-Tab"
    <server>
        > Sandbox
            > WEB
                > XML
                    myFile.xml
    Then all works fine, when I now drag the file into the transaction. As you described, an XML Loader action is created with configuration "db://Sandbox/WEB/XML/myFile.xml" and the XML is loaded correctly.
    Thanks for your help!
    Best regards
    Michael

Maybe you are looking for

  • HT1203 Using the same Apple ID for more than one ipod.

    I am soon going to be purchasing a new ipod, so i was wondering if i can use my previous apple ID for my new ipod or if i have to create new apple ID and make a new itunes on my computer? (using windows)

  • Reinstall OS9.2.2-CD start up freezes-cannot boot OS from CD to install

    I recently had to trash the main drive due to a massive failure on my G4. The second HD has 10.4.11 installed on it. I boot from there. It does not have 'classic' installed. Tried to start up and got the message to install OS 9. Got out the install C

  • OrdSys.OrdImage

    Hi Guys Have a bit of a problem here I have a ordsys.ordimage columns in my DB i use a adf:render on the column to display it on the jsp now the problem is i have there images that will display on the jsp ... it displays the images but what it does i

  • Photoshop CC distorts my image after opening it (Video inside)

    Does anyone know the fix to this bug? It's been happening everytime I open a picture in photoshop. The whole picture gets distorted and weird colors appear. https://www.youtube.com/watch?v=XzbfD0P4dwc&feature=youtu.be

  • Problems sending an email with a field attached.

    Hi everyone, I’m having problems with sending an e-mail (with a field attached) to an external e-mail address. I’m using the followings functions: <b>'SO_DOCUMENT_INSERT' 'SO_OBJECT_UPLOAD' 'SO_ATTACHMENT_INSERT' 'SO_OBJECT_SEND'</b> Everything goes