Added withAttr method for attribute lookup.