string xmlTreeGetContent(xmlNode node [, string options])


  • node - the node to get the content of

  • options - content options (see below)


  • the content of node

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.">
      <nodeChild>Is 5&gt;3?  Yes it is!  ts is '&ts;'</nodeChild>

    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;'


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

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

Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.