Class Text
Text
node
Inherits from
-
Node
(base class)
Properties
Name | Type | Description |
---|---|---|
text
[get, set]
|
dstring |
node text
|
attrCount
[get]
|
int |
returns attribute count |
child
[set]
|
Node |
returns child node by index
|
childCount
[get]
|
int |
returns child node count
|
document
[get]
|
Document |
returns document node
|
firstChild
[get]
|
Node |
returns first child node
|
hasChildren
[get]
|
bool |
returns true if node has child nodes
|
id
[get]
|
int |
return element tag id
|
index
[get]
|
int |
return node index in parent 's child node collection, -1 if not found
|
isElement
[get]
|
bool |
returns true if node is element |
isText
[get]
|
bool |
returns true if node is text
|
lastChild
[get]
|
Node |
returns last child node
|
name
[get]
|
string |
return element tag name
|
nsid
[get]
|
short |
return element namespace id
|
nsname
[get]
|
string |
return element namespace name
|
parent
[get]
|
Node |
returns parent node
|
Methods
Name | Description |
---|---|
appendElement
|
append element child - by namespace and tag names
|
appendElement
|
append element child - by namespace and tag ids
|
appendText
|
append text child
|
attr
|
get attribute by index
|
attr
|
get attribute by namespace and attribute ids |
attr
|
get attribute by namespace and attribute names |
attrValue
|
get attribute value by namespace and attribute ids |
childElement
|
returns child node by index and optionally compares its tag id , returns null if child with this index is not an element or id does not match
|
childIndex
|
find child node, return its index if found, -1 if not found or not child of this node
|
hasAttr
|
returns true if node has attribute with specified name
|
hasAttr
|
returns true if node has attribute with specified id
|
setAttr
|
set attribute value by namespace and attribute names
|
setAttr
|
set attribute value by namespace and attribute ids
|
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2015
License
Boost License 1.0