xmlReaderGetContent

SYNOPSIS

string xmlReaderGetContent(xmlReader reader)

Parameters:

  • reader - the xmlReader object

Returns:

  • The content of the current element or attribute.


DESCRIPTION
xmlReaderGetContent() returns the text content of the current node. If you are on a text node or an attribute, It will simply be their value. If you're on an element, it will be a concatenation of all of the element's text values.


EXAMPLE

<$content = (xmlReaderGetContent($reader))>


CAVEATS
If you are on the opening of an element, the parser must read ahead, up to the closing of that element, in order to make sure it sees all the text nodes. In other words, if you're working with a 2GB XML file, you probably don't want to call xmlReaderGetContent() on the root node.


SEE ALSO
xmlReaderGetName, xmlReaderGetAllContent


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