> From: Thierry Hanser <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [dom4j-user] [REQ] Problem with DocumentHelper.createDocument(Element)
>
> Hi Cedric
>
> The problem comme from the way you create the root element (i.e. objElement) Your method seems to provide a document
> (in this case a org.dom4j.tree.DefaultDocument) as owner of the objElement element. This occures probably in your
> toXML(..) method.
>
> Is there a way for you to create your element without providing the container Document?
>
> Thierry

Hi Thierry,

Thanx a lot for your help, I managed to fix the problem with your explanations.

Basically, the toXML method was itself using DocumentHelper.createDocument(), adding elements to the created document, and then returning doc.getRootElement(). The element returned was therefore a root element. I am now using DocumentHelper.createElement() and returning this element on completion.

Regards,
Cedric Picard,
Software Engineer
Kainos Software Ltd.

--

This e-mail is confidential and is intended for the named recipient only. If
you receive it in error please destroy the message and all copies. Kainos
Software Ltd. does not accept liability for damage sustained as a result of
malicious software (e.g. viruses). Kainos does not accept liability for, or
permit, the creation of contracts on its behalf by e-mail, the publication of
any defamatory statement by its employees by e-mail, or changes subsequently
made to the original message. The Company's registered office is located at
4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland, Tel +44 28 9057 1100.

Reply via email to