<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Tahoma size=2>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm new to XML and JDOM but trying to get
involved.</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm using JDOM to read in configuration files
and then initialize log4j(1.1.3) with the root element of one of these
files.</FONT></DIV>
<DIV><FONT face=Arial size=2>When I use </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>DOMOutputter domOutputter = new
DOMOutputter<BR>
(Constants.DEFAULT_DOM_ADAPTER_CLASS);<BR></FONT><FONT face=Arial
size=2>org.w3c.dom.Element element =
domOutputter.output(document.getRootElement());<BR>DOMConfigurator.configure(element);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I'll get a configuration-error from log4j but when
I instead use</FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT face=Tahoma></FONT> </DIV></FONT>
<DIV><FONT face=Arial size=2>org.w3c.dom.Document doc =
domOutputter.output(document);<BR>DOMConfigurator.configure(doc.getDocumentElement());</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>then everything works fine.</FONT></DIV>
<DIV><FONT face=Arial size=2>I even tried to print me out the JDOM-generated
org.w3c.dom.Element but that didn't work out because I couldn't append this
to</FONT></DIV>
<DIV><FONT face=Arial size=2>an org.w3c.dom.Document with the error: (using
Xerces that means DocumentImpl)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>org.w3c.dom.DOMException: DOM005 Wrong
document<BR> at
org.apache.xerces.dom.ParentNode.internalInsertBefore(ParentNode.java:390)<BR>
at
org.apache.xerces.dom.ParentNode.insertBefore(ParentNode.java:322)<BR>
at
org.apache.xerces.dom.CoreDocumentImpl.insertBefore(CoreDocumentImpl.java:387)<BR>
at
org.apache.xerces.dom.NodeImpl.appendChild(NodeImpl.java:228)<BR>
at
de.subsist.zeiterfassung.configuration.XMLLogConfiguration.outputElement(XMLLogConfiguration.java:78)<BR>
at
de.subsist.zeiterfassung.configuration.XMLLogConfiguration.initializeLogging(XMLLogConfiguration.java:65)<BR>
at
de.subsist.zeiterfassung.configuration.XMLConfiguration.initLogging(XMLConfiguration.java:65)<BR>
at de.subsist.zeiterfassung.InitMain.main(InitMain.java:59)<BR>Exception in
thread "main" <BR></FONT></DIV>
<DIV><FONT face=Arial size=2>As I said I'm new to that but </FONT><FONT
face=Arial size=2>I've seen a little discussion about the method :
</FONT></DIV>
<DIV><FONT face=Arial size=2> org.w3c.dom.Element
DOMOutputter.output(org.jdom.Element element) </FONT></DIV>
<DIV><FONT face=Arial size=2>and so I just want to know what I've done wrong and
what about this methods!</FONT></DIV>
<DIV><FONT face=Arial size=2>cheers</FONT></DIV></FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>Ralf
Lorenz<BR>____________________________</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>subsist GmbH<BR>Gautschweg 2<BR>01309
Dresden<BR>Tel. +49 351 315 65 55<BR>Fax. +49 351 315 65 50<BR><A
href="http://www.subsist.de">http://www.subsist.de</A><BR><A
href="http://palm.subsist.de">http://palm.subsist.de</A><BR></FONT></DIV></BODY></HTML>