Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Are the Attributes and Namespaces classes necessary?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Kevin Herrboldt <kevin AT puppethead.com>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Are the Attributes and Namespaces classes necessary?
  • Date: Wed, 25 Sep 2002 14:03:43 -0500

On Wednesday, Sep 25, 2002, at 09:07 US/Central, Elliotte Rusty Harold wrote:
[...]
1. The attributes and namespaces requested would always be live

I think this is a very good thing.

[...]
2. Taking a persistent snapshot of attributes or namespaces, would require a little more work on the part of the client programmer. (How common is this use-case anyway?) At some point, I do foresee adding a generic NodeList class that might be able to be used for this purpose.

How about methods that return a Set of attributes and namespaces? You eliminate the specialized classes but still offer convenient "snapshot" capabilities. Or maybe pattern it after, say, how ThreadGroup works to get all threads into a Thread[].

I'd say go with the collections approach, unless Java 1.1 compatibility is a factor. In that case use the arrays and anyone who wants a Set can stuff the array into one.





Archive powered by MHonArc 2.6.24.

Top of Page