[jdom-interest] JDOMException

Rafizan Baharum udabahar at umich.edu
Sun Oct 15 14:09:28 PDT 2000


hi..

i tested your xml..and ive got the same error.. funny thing is if i delete the
attributes and
left only TWO attributes.. it works..uhmm bug?
btw im using jdomb5..



.z00t

"Gregory S. Hill" wrote:

> 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
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com




More information about the jdom-interest mailing list