xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] Traversing Attributes and Namespace Declarations
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: "Bradley S. Huffman" <hip AT a.cs.okstate.edu>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Traversing Attributes and Namespace Declarations
- Date: Sun, 4 May 2003 12:32:39 -0400
Any thoughts on getting rid of getAttributeCount(), getAttribute(index),
getNamespaceDeclarationCount(), getNamespaceDeclaration(index) in favor
of two methods, getAttributes(), getNamespaceDeclarations(), that return a
iterator. I'm guessing you don't like java iterators cause they're not type
safe, but index operations on attributes and declarations just seems weird.
I think we had something close to that at one point. I'm absolutely not going to uuse a type-unsafe iterator. And I will use indexed access, as SAX does.
However, I could see exposing the existing package protected Attributes and Namespaces classes publicly; not all of them but enough of them to allow read-only access. However, this would add at least two classes and four methods, a net gain of two classes. On the other hand, perhaps more smaller classes is better, I admit that I'm uncomfortable with how big Element is. But I'm not convinced yet.
What does everyone else think?
--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
-
[XOM-interest] Traversing Attributes and Namespace Declarations,
Bradley S. Huffman, 05/04/2003
-
Re: [XOM-interest] Traversing Attributes and Namespace Declarations,
Elliotte Rusty Harold, 05/04/2003
- Re: [XOM-interest] Traversing Attributes and Namespace Declarations, Bradley S. Huffman, 05/04/2003
-
Re: [XOM-interest] Traversing Attributes and Namespace Declarations,
Elliotte Rusty Harold, 05/04/2003
Archive powered by MHonArc 2.6.24.