Key name | Evaluates to |
---|
* or _children | all direct element children of current nodes (non-recursive).
Applicable to element and document nodes. |
@* or _attributes | all attributes of current nodes. Applicable to elements only.
|
@attributeName | named attributes of current nodes. Applicable to elements,
doctypes and processing instructions. On doctypes it supports
attributes publicId, systemId and
elementName. On processing instructions, it supports
attributes target and data, as well as any
other attribute name specified in data as
name="value" pair on dom4j or JDOM models.
The attribute nodes for doctype and processing instruction are
synthetic, and as such have no parent. Note, however that
@* does NOT operate on doctypes or processing
instructions. |
_ancestor | all ancestors up to root element (recursive) of current nodes.
Applicable to same node types as _parent. |
_ancestorOrSelf | all ancestors of current nodes plus current nodes. Applicable
to same node types as _parent. |
_cname | the canonical names of current nodes (namespace URI + local
name), one string per node (non-recursive). Applicable to
elements and attributes |
_content | the complete content of current nodes, including children
elements, text, entity references, and processing instructions
(non-recursive). Applicable to elements and documents. |
_descendant | all recursive descendant element children of current nodes.
Applicable to document and element nodes. |
_descendantOrSelf | all recursive descendant element children of current nodes
plus current nodes. Applicable to document and element nodes.
|
_document | all documents the current nodes belong to. Applicable to all
nodes except text. |
_doctype | doctypes of the current nodes. Applicable to document nodes
only. |
_filterType | is a filter-by-type template method model. When called, it
will yield a node list that contains only those current nodes
whose type matches one of types passed as argument. You can pass
as many string arguments as you want, each representing one of
the types to select: "attribute", "cdata",
"comment", "document",
"documentType", "element",
"entity", "entityReference",
"namespace", "processingInstruction", or
"text". |
_name | the names of current nodes, one string per node
(non-recursive). Applicable to elements and attributes
(returns their local names), entity references, processing
instructions (returns its target), doctypes (returns its public
ID) |
_nsprefix | the namespace prefixes of current nodes, one string per node
(non-recursive). Applicable to elements and attributes |
_nsuri | the namespace URIs of current nodes, one string per node
(non-recursive). Applicable to elements and attributes |
_parent | parent elements of current nodes. Applicable to element,
attribute, comment, entity, processing instruction. |
_qname | the qualified names of current nodes in
[namespacePrefix:]localName form, one string per node
(non-recursive). Applicable to elements and attributes |
_registerNamespace(prefix, uri) | register a XML namespace with the specified prefix and URI for
the current node list and all node lists that are derived from
the current node list. After registering, you can use the
nodelist["prefix:localname"] or
nodelist["@prefix:localname"] syntaxes to
reach elements and attributes whose names are namespace-scoped.
Note that the namespace prefix need not match the actual prefix
used by the XML document itself since namespaces are compared
solely by their URI. |
_text | the text of current nodes, one string per node
(non-recursive). Applicable to elements, attributes, comments,
processing instructions (returns its data) and CDATA sections.
The reserved XML characters ('<' and '&') are NOT
escaped. |
_type | Returns a string describing the type of nodes, one
string per node. The returned values are "attribute",
"cdata", "comment", "document",
"documentType", "element",
"entity", "entityReference",
"namespace", "processingInstruction",
"text", or "unknown". |
_unique | a copy of the current nodes that keeps only the first
occurrence of every node, eliminating duplicates. Duplicates can
occur in the node list by applying uptree-traversals
_parent, _ancestor, _ancestorOrSelf,
and _document on a node list with multiple elements.
I.e. foo._children._parent will return a node list that
has duplicates of nodes in foo - each node will have the number
of occurrences equal to the number of its children. In these
cases, use foo._children._parent._unique to eliminate
duplicates. Applicable to all node types. |
any other key | element children of current nodes with name matching the key.
This allows for convenience child traversal in
book.chapter.title style syntax. Applicable to document
and element nodes. |