LUA object: xmlelement

The object represents an XML element within a document.

AvailabilityThe object is returned by a method or a property of another object

appendattribute

DescriptionAdds an attribute to the element
Value Type
Formatxmlelement.appendattribute(attribute)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
attributexmlattributeThe attribute to add to the element
Examples
xmlelement.appendattribute(xmlattribute)

appendchild

DescriptionAdds an XML element as a child
Value Type
Formatxmlelement.appendchild(element)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
elementxmlelementThe element to add
Examples
xmlelement.appendchild(element2)

getattributes

DescriptionRetrieves all the xml attributes present within the element
Value Typelist<xmlattributes>
Formatlist<xmlattributes> = xmlelement.getattributes()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
attributes = xmlelement.getattributes()

getvalue

DescriptionRetrieves the value saved inside the element
Value Typeobject
Formatobject = xmlelement.getvalue()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
value = xmlelement.getvalue()

removeattribute

DescriptionRemoves a specific XML attribute from the element
Value Type
Formatxmlelement.removeattribute(attribute)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
attributexmlattributeThe attribute to be deleted
Examples
xmlelement.removeattribute(attribute)

setvalue

DescriptionSets the value of an element
Value Type
Formatxmlelement.setvalue(value)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
valueobjectThe value to be set
Examples
xmlelement.setvalue("value")