SYNOPSISstring xmlTreeGetContent(xmlNode node [, string options])
Parameters:
node
- the node to get the content ofoptions
- content options (see below)
Returns:
node
DESCRIPTIONxmlTreeGetContent()
gets the content of the node node
. If
node
is an element, then it returns the concatenation of this
element's text nodes.
Currently options
only has one possible value:
NO_INLINE
- By default entity references are replaced
with their proper values. For example on the following XML
document:
<?xml version="1.0"?>
<!DOCTYPE rootNode [
<!ELEMENT rootNode (nodeChild)>
<!ELEMENT nodeChild (#PCDATA)>
<!ENTITY ts "Thunderstone Software, LLC.">
]>
<rootNode>
<nodeChild>Is 5>3? Yes it is! ts is '&ts;'</nodeChild>
</rootNode>
By default, calling xmlTreeGetContent()
on the element
nodeChild
(or its text child) would return
Is 5>3? Yes it is! ts is 'Thunderstone Software, LLC.'
The entities >
and &ts;
were substituted. You can
disable the substitution by passing NO_INLINE
as an option.
Doing so would give the following text from xmlTreeGetContent()
:
Is 5>3? Yes it is! ts is '&ts;'
EXAMPLE<$content = (xmlTreeGetContent($node))>
SEE ALSOxmlTreeGetName
,
xmlTreeGetAllContent
,
xmlTreeGetChildrenContent
,
xmlTreeGetLine
,
xmlTreeGetType
,
xmlTreeIsBlankNode
,
xmlTreeGetAttributeContent