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: Remko Popma <remko.popma AT azzurri.jp>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>, Michael McEniry <mmceniry AT itsc.uah.edu>, XOM-interest <XOM-interest AT lists.ibiblio.org>
  • Subject: RE: [XOM-interest] Element.add()
  • Date: Fri, 20 Sep 2002 03:42:03 +0900 (JST)

--- Elliotte Rusty Harold <elharo AT metalab.unc.edu> wrote:

> >Why does Element have both "Attribute getAttribute(String name)"
> >and "String readAttribute(String name)"?
> >
>
> The former returns an Attribute object. The latter returns an
> attribute value. Originally, I just used getAttribute().getValue()
> but that's asking for NullPointerExceptions.
>
> This is the second or third time I've had to answer this question, so
> maybe "readAttribute" is not the best name. Should it just be
> "getAttributeValue()" perhaps? Longer to type, but maybe more obvious.
> --

"getAttributeValue()" is what I would expect.

Remko




Archive powered by MHonArc 2.6.24.

Top of Page