standard.lib.xml.xmlTextReaderPreservePattern

xmlTextReaderPreservePattern is available since version 1.0.

Prototype:

number xmlTextReaderPreservePattern(number reader, string pattern)

Parameters

reader
the xmlTextReaderPtr used as returned by xmlReaderForMemory or xmlReaderForFile
pattern
an XPath subset pattern

Description:

This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc to keep a handle on the resulting document once parsing has finished.

Return value:

Returns a positive number in case of success and -1 in case of error.