[jdom-interest] JDOMException
Gregory S. Hill
greg at visualmining.com
Sat Oct 14 16:51:15 PDT 2000
Okay folks. I've been lurking long enough. Now it's time to pick some
brains. I'm feel particularly stupid, right now. Any help would be
most appreciated.
I've got the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<Chart type="bar">
<ChartSize width="400" height="400" />
<ChartFormat graphType="ROWS" layout="VERTICAL" 3DDepth="10"
width="30" stackLabel="ITEM" />
<DataSet name="set1" color="red" type="BAR" xAxis="BOTTOM"
yAxis="LEFT">5,10,15,20,25</DataSet>
<DataSet name="set2" color="yellow">10,20,30,40,50</DataSet>
</Chart>
When I try to load this xml into my java program (using 'Document doc =
builder.build (new File (datasource));'), I get the following exception:
EXCEPTION: org.jdom.JDOMException: Element type "ChartFormat" must be
followed by either a
ttribute specifications, ">" or "/>".: Error on line 4 of document
file:/d:/vmi/dev/src/Xm
lChart/simplebar.xml: Element type "ChartFormat" must be followed by
either attribute spec
ifications, ">" or "/>".
org.jdom.JDOMException: Element type "ChartFormat" must be followed by
either attribute sp
ecifications, ">" or "/>".: Error on line 4 of document
file:/d:/vmi/dev/src/XmlChart/simp
lebar.xml: Element type "ChartFormat" must be followed by either
attribute specifications,
">" or "/>".
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:310)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:373)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
at XmlChart.createXml(XmlChart.java:36)
at XmlChart.<init>(XmlChart.java:23)
at XmlChart.main(XmlChart.java:171)
Am I missing something really stupid with my XML code? Line 4 seems
pretty straight forward to me, but I still consider myself a neophyte in
the XML world.
I've tried this with both beta 5 and beta 4. No glory either way.
tia,
greg
More information about the jdom-interest
mailing list