I am trying t develop an application which gives out the report using Jasper Reports+iReport, all the thing went fine until i got this error on running the program. I am not much into xml so please consider me a noob while helping, so Please help me out, here is my report.jrxml file
<?xml version="1.0" encoding="UTF-8"?>
< jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
name="report1"
language="groovy"
pageWidth="595"
pageHeight="842"
columnWidth="555"
leftMargin="20"
rightMargin="20"
topMargin="20"
bottomMargin="20">
.................................
..............
............
</jasperReport>
Two things:
Make sure that the document is well-formed. In the start tag of the root element, remove the space after the left angle bracket so that it reads
<jasperReport
.See http://coffeecokeandcode.blogspot.com/2008/11/jasper-reports-and-legacy-formats.html
来源:https://stackoverflow.com/questions/5754283/org-xml-sax-saxparseexception-document-root-element-jasperreport-must-match