XMLList
Constructors
Constructor
new XMLList(
message?):XMLList
Parameters
stringReturns
XMLListMethods
attribute
attribute(
attributeName):string
Returns the attribute with the requested name
Parameters
stringReturns
stringattributes
attributes():
string[]
Returns all attributes of this element
Returns
string[]child
child(
index):XML[]
Returns the child element with the given propertyName, or if propertyName is an integer, returns the child in that position
Parameters
string | numberReturns
children
children():
XML[]
Returns the index of this child among its siblings
Returns
comments
comments():
string
Returns all the comments that are children of this XML object
Returns
stringcontains
contains(
value):boolean
Compares this element with the value, primarily provided to enable an XML element and an XML list to be used interchangeably
Parameters
stringReturns
booleancopy
copy():
XML
Returns a deep copy of this element (children, grandchildren, ...)
Returns
descendants
descendants(
name?):XML[]
Returns the descendant elements. If a name is provided, only elements with that name are returned.
Parameters
stringReturns
elements
elements(
name?):XML[]
Returns the child elements. If a name is provided, only elements with that name are returned
Parameters
stringReturns
hasComplexContent
hasComplexContent():
boolean
Returns true for elements with child elements, otherwise false
Returns
booleanhasSimpleContent
hasSimpleContent():
boolean
Returns true for attributes, text nodes, or elements without child elements, otherwise false
Returns
booleanlength
length():
number
Returns the amount of elements containing this xml list
Returns
numbernormalize
normalize():
void
Merge adjacent text nodes and eliminate empty ones
Returns
voidparent
parent():
XML
The parent of this object
Returns
processingInstructions
processingInstructions(
name?):string[]
A list of all processing instructions that are children of this element. If a name is provided, only processing instructions matching this name will be returned.
Parameters
stringReturns
string[]text
text():
string
Concatenation of all text node children
Returns
stringtoString
toString():
string
For elements without element children, returns the values of the text node children. For elements with children, returns same as toXMLString. For other kinds of objects, the value of the object.
Returns
stringtoXMLString
toXMLString():
string
Serializes this XML object as parse-able XML
Returns
stringvalueOf
valueOf():
XML
Returns this XML object
Returns
Indexable
[key: string]: any