ktrinad Posted August 31, 2006 Share Posted August 31, 2006 By: acajax - liufenghuixue can't load xml generated by itself! 2003-06-11 21:12 I use iReport to create a report, and saved is as a xml file. But, after I opened it and edited it for serveral times, I can't opened it in iReport again. I changed the charset to GB2312 or iso-8859-1,The problem is the same.The warning is:"Start of root element expected instead of TEXT null:D:goog.xml".even if i copy another xml file that can load correctly into the goog.xml,the warning is the same. By: Giulio Toffoli - gt78 RE: can't load xml generated by itself! 2003-06-12 00:57 The problem could be caused by a workaround used to not validate the document using a DTD. Post the first 20 rows (or all document). We can see what is wrong and why. Giulio By: acajax - liufenghuixue RE: can't load xml generated by itself! 2003-06-12 17:58 <?xml version="1.0" encoding="GB2312" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="gongkuanghetong3" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <background> <band height="0"> </band> </background> <title> <band height="50"> <staticText> <reportElement mode="Transparent" x="134" y="4" width="211" height="40" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" /> </textElement> <text>StaticText</text> </staticText> </band> </title> <pageHeader> <band height="0"> </band> </pageHeader> <columnHeader> <band height="0"> </band> </columnHeader> <detail> <band height="527"> <staticText> <reportElement mode="Transparent" x="18" y="16" width="46" height="12" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="STSong-Light" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="UniGB-UCS2-H" isStrikeThrough="false" /> </textElement> <text>供方:</text> </staticText> <staticText> <reportElement mode="Transparent" x="16" y="41" width="43" height="15" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="STSong-Light" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="UniGB-UCS2-H" isStrikeThrough="false" /> </textElement> <text>需方:</text> </staticText> <staticText> <reportElement mode="Transparent" x="302" y="10" width="41" height="12" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" /> </textElement> <text>StaticText</text> </staticText> <staticText> <reportElement mode="Transparent" x="300" y="29" width="44" height="11" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" /> </textElement> <text>StaticText</text> </staticText> <staticText> <reportElement mode="Transparent" x="299" y="48" width="46" height="13" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" /> </textElement> <text>StaticText</text> </staticText> <line direction="TopDown"> <reportElement mode="Opaque" x="50" y="28" width="237" height="0" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </line> <line direction="TopDown"> <reportElement mode="Opaque" x="49" y="55" width="240" height="0" forecolor="#000000" backcolor="#FFFFFF" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </line> </band> </detail> <columnFooter> <band height="0"> </band> </columnFooter> <pageFooter> <band height="0"> </band> </pageFooter> <summary> <band height="0"> </band> </summary> </jasperReport> By: Giulio Toffoli - gt78 RE: can't load xml generated by itself! 2003-06-13 02:51 Try to change your encoding to UTF-8. I think that the M$ xml reader don't support GB2312 :-( Giulio By: acajax - liufenghuixue RE: can't load xml generated by itself! 2003-06-13 05:42 I changed it to utf-8,but the problem is the same! help! By: Giulio Toffoli - gt78 RE: can't load xml generated by itself! 2003-06-13 08:07 Strange, I have loaded your code succesfully! Try UTF-8 instead utf-8. Giulio By: acajax - liufenghuixue RE: can't load xml generated by itself! 2003-06-16 22:05 Strange!The system show me the error: Start of root element expected instead of TEXT 'null':D:jaspergongxiaohetong3.xml why? By: Giulio Toffoli - gt78 RE: can't load xml generated by itself! 2003-06-17 01:19 The problem appeare when you use non latin character sets (that use 2 bytes for several characters and the MS xml parser can fail). Try to apply the patch by E. Abadjiev https://sourceforge.net/tracker/index.php?func=detail&aid=747536&group_id=64348&atid=507165 Post me the XML. But don't paste it here, bacause the encoding is changed when it is displayed to me (note that my browser don't support asian and russian charsets...) gt (at) users.sourceforge.net Giulio Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now