type
constructors
make |
Construct an element with unqualified local name and optional XML namespace. |
---|
fields
line |
Line number of XML element in source file or zero if unknown. |
---|---|
name |
Unqualified local name of the element. |
ns |
The XML namespace which qualified this element's name. |
methods
add |
If child is a XAttr then add an attribute. |
---|---|
addAttr |
Add an attribute to this element. |
attr |
Get an attribute by its non-qualified local name. |
attrs |
Get this element's attributes as a readonly list. |
children |
Get this element's children elements, text, and PIs as a readonly list. |
clearAttrs |
Remove all the attributes. |
copy |
Make a shallow copy of this element. |
each |
Iterate each child element, text, and PI node in the |
eachAttr |
Iterate each attribute in the |
elem |
Find an element by its non-qualified local name. |
elems |
Get the children elements. |
get |
Get an attribute value by its non-qualified local name. |
nodeType |
Return the |
prefix |
If this element is qualified by an XML namespace then return the namespace's prefix. |
qname |
Qualified name of the element. |
remove |
Remove the child element, text, or PI from this element. |
removeAt |
Remove the child element, text, or PI at the specified index into |
removeAttr |
Remove the attribute from this element. |
removeAttrAt |
Remove the attribute at the specified index into |
text |
Return this element's child text node. |
toStr |
String representation is as a start tag. |
uri |
If this element is qualified by an XML namespace then return the namespace's uri. |
write |
Write this node to the output stream. |
Slot Details
add
addAttr
attr
attrs
children
clearAttrs
copy
each
eachAttr
elem
elems
get
line
make
src
new make(Str name, XNs? ns := null)
Construct an element with unqualified local name and optional XML namespace. The XNs instance should be defined as an attribute on this or an ancestor element (see XAttr.makeNs
).
name
nodeType
src
virtual override XNodeType nodeType()
Return the XNodeType.elem
. Note that during pull parsing XParser will return elemStart
and elemEnd
.