new YXmlElement()
Methods
-
getAttribute(attributeName) → {String}
-
Returns an attribute value that belongs to the attribute name.
Parameters:
Name Type Description attributeNameString The attribute name that identifies the queried value.
Returns:
String -The queried attribute value.
-
getAttributes() → {Object}
-
Returns all attribute name/value pairs in a JSON Object.
Returns:
Object -A JSON Object that describes the attributes.
-
removeAttribute(attributeName)
-
Removes an attribute from this YXmlElement.
Parameters:
Name Type Description attributeNameString The attribute name that is to be removed.
-
setAttribute(attributeName, attributeValue)
-
Sets or updates an attribute.
Parameters:
Name Type Description attributeNameString The attribute name that is to be set.
attributeValueString The attribute value that is to be set.
-
toDom(_documentopt, hooksopt, bindingopt) → {Element}
-
Creates a Dom Element that mirrors this YXmlElement.
Parameters:
Name Type Attributes Default Description _documentDocument <optional>
document The document object (you must define this when calling this method in nodejs)
hooksObject.<string, any> <optional>
{} Optional property to customize how hooks are presented in the DOM
bindingDomBinding <optional>
You should not set this property. This is used if DomBinding wants to create a association to the created DOM type.
-
toDomString() → {String}
-
Returns the string representation of this YXmlElement. The attributes are ordered by attribute-name, so you can easily use this method to compare YXmlElements
Returns:
String -The string representation of this type.