Class xrx.label
Defined in: label.js.
Constructor Attributes | Constructor Name and Description |
---|---|
xrx.label(array)
Constructs a new label.
|
Method Attributes | Method Name and Description |
---|---|
child()
Mutates the label into its child label.
|
|
clone()
Returns a copy of the label.
|
|
first()
Returns the first label item.
|
|
isBefore(label)
|
|
jointParent(label)
Returns the joint parent of two labels.
|
|
last()
Returns the last label item.
|
|
length()
Returns the length of the label.
|
|
Mutates the label into its next sibling label.
|
|
parent()
Mutates the label into its parent label.
|
|
Mutates the label into its preceding sibling label.
|
|
push0()
Helper function for xrx.token.NOT_TAG.
|
|
sameAs()
Indicates whether two labels are the same.
|
|
value(index)
Returns a label item at position index.
|
Class Detail
xrx.label(array)
Constructs a new label.
- Parameters:
- {?Array.} array
- The array of numbers.
Method Detail
child()
Mutates the label into its child label.
{!xrx.label}
clone()
Returns a copy of the label.
- Returns:
- {!xrx.label}
{!number}
first()
Returns the first label item.
- Returns:
- {!number}
isBefore(label)
- Parameters:
- label
{!xrx.label}
jointParent(label)
Returns the joint parent of two labels.
- Parameters:
- {!xrx.label} label
- Returns:
- {!xrx.label}
{!number}
last()
Returns the last label item.
- Returns:
- {!number}
{!number}
length()
Returns the length of the label. The length corresponds
to the nesting depth of a node or token in the XML tree.
- Returns:
- {!number}
nextSibling()
Mutates the label into its next sibling label.
parent()
Mutates the label into its parent label.
precedingSibling()
Mutates the label into its preceding sibling label.
push0()
Helper function for xrx.token.NOT_TAG.
{!boolean}
sameAs()
Indicates whether two labels are the same.
- Parameters:
- {!xrx.label}
- Returns:
- {!boolean}
{!number}
value(index)
Returns a label item at position index.
- Parameters:
- {!number} index
- The index.
- Returns:
- {!number}