Struct xml_builder::XMLElement [−][src]
pub struct XMLElement { /* fields omitted */ }Expand description
Structure representing an XML element field.
Implementations
Instantiates a XMLElement object.
Arguments
name- A string slice that holds the name of the XML element.
Sets whether attributes should be sorted or not.
Arguments
should_sort- A boolean indicating whether attributes should be sorted or not.
Adds the given name/value attribute to the XMLElement.
Arguments
name- A string slice that holds the name of the attributevalue- A string slice that holds the value of the attribute
Adds a new XMLElement child object to the references XMLElement. Raises a XMLError if trying to add a child to a text XMLElement.
Arguments
element- A XMLElement object to add as child
Adds text content to a XMLElement object. Raises a XMLError if trying to add text to a non-empty object.
Arguments
text- A string containing the text to add to the object