[jdom-interest] List/Document - Document(java.util.List content)

bob mcwhirter bob at werken.com
Tue Oct 8 21:04:57 PDT 2002

On Tue, 8 Oct 2002 yk at nyc.rr.com wrote:

> I'm using Jaxen/XPath, to query my XML docs.
> However, the results are returned as a list. For some returns
> the List value is fine, but some complex queries require the
> List to be made back into jdom.Document or I into a string
> format that retains the format, order, attributes that I can 
> write into a session saved XML file to be used again.

You're getting back a list of Elements/Attributes/Whatever that
are sill attached to the original document you've queried against.

You can certainly detach() them and reattach them however you like
to a new document.  But, you -will- get errors attemping to add them
to a different document before you detach them.


More information about the jdom-interest mailing list