| Class | Jabber::Protocol::XMLElement |
| In: |
lib/jabber4r/protocol.rb
|
| Parent: | Object |
Utility class to create valid XML strings
| parent | [RW] | The parent XMLElement |
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
| attrib: | [String] The attribute name |
| value: | [String] The attribute value |
| return: | [Jabber::Protocol::XMLElement] self for chaining |
Adds cdata to this element
| cdata: | [String] The cdata to add |
| return: | [Jabber::Protocol::XMLElement] self for chaining |
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 data to this element
| data: | [String] The data to add |
| return: | [Jabber::Protocol::XMLElement] self for chaining |
Sets the namespace for this tag
| ns: | [String] The namespace |
| return: | [Jabber::Protocol::XMLElement] self for chaining |
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). |