XMLReader functions
Introduzione
The XMLReader extension is an XML Pull parser. The reader acts as a cursor going forward on the document stream and stopping at each node on the way.
Codifica
It is important to note that internally, libxml uses the UTF-8 encoding and as such, the encoding of the retrieved contents will always be in UTF-8 encoding.
Installazione
The XMLReader extension is available in PECL as of PHP 5.0.0 and is included and enabled as of PHP 5.1.0 by default. It can be enabled by adding the argument --enable-xmlreader (or --with-xmlreader before 5.1.0) to your configure line. The libxml extension is required.
Classi predefinite
XMLReader
Metodi
-
XMLReader::close - Close the XMLReader input
-
XMLReader::expand - Export current node to a DOM node
-
XMLReader::getAttribute - Get value of attribute by name
-
XMLReader::getAttributeNo - Get value of attribute by position
-
XMLReader::getAttributeNs - Get value of attribute by name and URI
-
XMLReader::getParserProperty - Indicates if parser property is set or not
-
XMLReader::isValid - Indicates if document is valid
-
XMLReader::lookupNamespace - Get URI for prefix in scope of node
-
XMLReader::moveToAttribute - Positions reader on named attribute
-
XMLReader::moveToAttributeNo - Positions reader on attribute by index
-
XMLReader::moveToAttributeNs - Position reader on attribute by name and URI
-
XMLReader::moveToElement - Move to parent element of current attribute node
-
XMLReader::moveToFirstAttribute - Move to first attribute of node
-
XMLReader::moveToNextAttribute - Move to next attribute of node
-
XMLReader::next - Move to next element skipping children
-
XMLReader::open - Set URI to be parsed
-
XMLReader::read - Move to next node in stream
-
XMLReader::setParserProperty - Set parser property
-
XMLReader::setRelaxNGSchema - Set URI of RelaxNG schema to validate against
-
XMLReader::setRelaxNGSchemaSource - Set string containing RelaxNG schema to validate against
-
XMLReader::XML - Set string of data to be parsed