Gary --

Many thanks for the help! All the time I allways thought of the input 
files not mentioning there has to be a unique root-element also in the 
output.  :-(
I modified my code and it now works as it should.
:-)

In any case I learned a lot about DOM(2) the last days thanks to you and 
this mailing-thread...

Martin


Gary L Peskin wrote:

> Martin --
> 
> Okay.  I see what's going on.  The stack trace was very helpful.  The
> error message is occuring while you're attempting to build the -output-
> DOM.  Each time you have an Order element, you write out <hr/>.  But
> each <hr/> is at the top level of the resulting DOM tree.  This is not
> allowed in the DOM.  Only one top level element is allowed which is why
> you're getting that error message.
> 
> To see exactly what's going on, change:
> 
>   transformer.transform(xmlDomSource, domResult);
> 
> to 
> 
>   transformer.transform(xmlDomSource, new StreamSource(System.out));
> 
> HTH,
> Gary


Reply via email to