Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] Element.add()

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael McEniry" <mmceniry AT itsc.uah.edu>
  • To: "XOM-interest" <XOM-interest AT lists.ibiblio.org>
  • Subject: RE: [XOM-interest] Element.add()
  • Date: Thu, 19 Sep 2002 11:55:44 -0500

Is it confusing that Element is playing multiple container roles?
- Attribute map (map-like set?)
- namespace set (set-like map?)
- Element list
- Node/TreeNode

The method names should consistently identify the role and
function. For example, Element-as-Attribute-map should have
addAttribute, removeAttribute, and getAttribute.

Why does Element have both "Attribute getAttribute(String name)"
and "String readAttribute(String name)"?

-- michael mceniry

-----Original Message-----
From: Elliotte Rusty Harold [mailto:elharo AT metalab.unc.edu]
Subject: [XOM-interest] Element.add()

Mostly because I wanted to keep the name short. But maybe for
consistency it should be addAttribute. On the other hand appendChild
and insertChild could just be append and insert. On the gripping
hand, the get and read and set methods really need the suffix because
there's more than one thing clients might reasonably want to get.
Thoughts?




Archive powered by MHonArc 2.6.24.

Top of Page