1 Reply Latest reply: Jun 10, 2011 6:09 AM by philipwi RSS

    Warnings about root element must be well-formed

    SpankyQ Community Member

      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">


              <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"/>



      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!