xmlTreeGetContent

 

SYNOPSIS

    string xmlTreeGetContent(xmlNode node [, string options])

Parameters:

  • node - the node to get the content of

  • options - content options (see below)

Returns:

  • the content of node


DESCRIPTION
xmlTreeGetContent() 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&gt;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 &gt; 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&gt;3? Yes it is! ts is '&ts;'


EXAMPLE

    <$content = (xmlTreeGetContent($node))>


SEE ALSO
xmlTreeGetName, xmlTreeGetAllContent, xmlTreeGetChildrenContent, xmlTreeGetLine, xmlTreeGetType, xmlTreeIsBlankNode, xmlTreeGetAttributeContent


Copyright © Thunderstone Software     Last updated: Dec 10 2018
Copyright © 2019 Thunderstone Software LLC. All rights reserved.