Fwd: Re: [jdom-interest] XML Signature

Jason Hunter jhunter at xquery.com
Fri Sep 17 09:33:23 PDT 2004


Trying again to forward Phill's email, this time including it directly 
since the forward didn't seem to work so well...

-jh-

I don't have a use for the signature stuff but the last bit.

BTW, I propose we add Document#getElementById(String id) in the
next release.

yes please, I would propose that we actually have an 
Element#getElementById(String id) as it is much more flexible and 
Document#getRootElement()#getElementById() would achieve the above.

I would much rather write

doc.getRootElement().getChild("partslist").getElementById("12345")

than

list = getRootElement().getChild("partsist").getChildren();
for (int i = 0; i < list.size(); i++) {
        Element e = list.get(i);
        if e.getAttributeValue("id").equals(id)  etc.

/Phill
IS Dept, Software Engineer.
phill_perryman at mitel.com
http://www.mitel.com
Tel: +44 1291 436023


More information about the jdom-interest mailing list