[jdom-interest] Problems converting DOM 2 JDOM
Jason Hunter
jhunter at acm.org
Sun Apr 15 21:24:23 PDT 2001
Try the latest code in CVS now. I improved the DOMBuilder logic to work
better with this situation.
-jh-
buccaneer12 at gmx.de wrote:
>
> Hi,
>
> I am Trying to convert a apache xerces DOM to JDOM:
>
> org.w3c.dom.Document dcmntDOM = new
> org.apache.xerces.dom.DocumentImpl(false);
> Element elmnt = dcmntDOM.createElement("aaaaaaaa");
> elmnt.setAttribute("bbbbbbb", "ccccccc");
> dcmntDOM.appendChild(elmnt);
>
> DOMBuilder dmbldrDOMToJDOM = new
> DOMBuilder(false);//strJDOMDOMBuilderAdapterClass);
>
> org.jdom.Document dc = dmbldrDOMToJDOM.build(dcmntDOM);
>
> When I run this:
> org.jdom.IllegalNameException: The name "null" is not legal for JDOM/XML
> elements: XML names cannot be null or empty.
>
> at org.jdom.Element.<init>(Element.java:137)
>
> at org.jdom.Element.<init>(Element.java:160)
>
> at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:409)
>
> at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:398)
>
> at org.jdom.input.DOMBuilder.build(DOMBuilder.java:359)
>
> at de.virtual_ivy_league.virtHo.XML.Test.JDOMTest.main(JDOMTest.java:45)
>
> So what is the problem?
>
> I am Using Xerces 1.3.1, Jdom 0.6, J2SDK13
>
> Thankx
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
> _______________________________________________
> 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