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

yk at nyc.rr.com yk at nyc.rr.com
Tue Oct 8 22:08:28 PDT 2002


I'm still having alittle trouble here.

Since you can't detach() a list, The only way I know if is to change
the list int to a jdom.Element. But when I do that, I get nothing returned.

Am I doing something wrong?

thanks
alex



-----Original Message-----
From: bob mcwhirter [mailto:bob at werken.com]
Sent: Wednesday, October 09, 2002 12:05 AM
To: yk at nyc.rr.com
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] List/Document - Document(java.util.List
content)


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.

	-bob




More information about the jdom-interest mailing list