Class Jabber::Protocol::XMLElement
|
|
Utility class to create valid XML strings
add_attribute,
add_cdata,
add_child,
add_data,
add_xml,
new,
set_namespace,
to_parent,
to_s,
to_xml,
Construct an XMLElement for the supplied tag
and attributes
tag: | [String] XML tag
|
attributes: | [Hash = {}] The attribute hash[attribute]=value
|
Adds an attribute to this element
Adds data to this element
Sets the namespace for this tag
Adds cdata to this element
Returns the parent element
Adds a child to this element of the supplied tag
tag: | [String] The element tag
|
attributes: | [Hash = {}] The attributes hash[attribute]=value
|
return: | [Jabber::Protocol::XMLElement] newly created
child element
|
Adds arbitrary XML data to this object
xml: | [String] the xml to add
|
Recursively builds the XML string by traversing this element's children.
format: | [Boolean] True to pretty-print (format) the output string
|
indent: | [Integer = 0] The indent level (recursively more)
|
Climbs to the top of this elements parent tree and then returns the to_xml XML string.
return: | [String] The XML string of this element (from the topmost parent).
|