add_element(element, attrs=nil)
Instance Public methods
Adds a child to this element, optionally setting attributes in the element.
element
optional. If Element, the element is added.
Otherwise, a new Element is constructed with the
argument (see Element.initialize).
attrs
If supplied, must be a Hash containing String
name,value pairs, which will be used to set the attributes of the new Element.
Returns
the Element that was added
el = doc.add_element 'my-tag'
el = doc.a