def decode_tag(ns, elename, attrs, parent)
@textbuf = ''
is_nil, type, arytype, root, offset, position, href, id, extraattr =
decode_attrs(ns, attrs)
o = nil
if is_nil
o = SOAPNil.decode(elename)
elsif href
o = SOAPReference.decode(elename, href)
@refpool << o
elsif @decode_typemap
o = decode_tag_by_wsdl(ns, elename, type, parent.node, arytype, extraattr)
else
o = decode_tag_by_type(ns, elename, type, parent.node, arytype, extraattr)
end
if o.is_a?(SOAPArray)
if offset
o.offset = decode_arypos(offset)
o.sparse = true
else
o.sparse = false
end
end
o.parent = parent
o.id = id
o.root = root
o.position = position
unless o.is_a?(SOAPTemporalObject)
@idpool << o if o.id
decode_parent(parent, o)
end
o
end