The XMLReader classIntroductionThe 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. Class synopsis
XMLReader
/* Constants */
public
const
int
XMLReader::NONE;
public
const
int
XMLReader::ELEMENT;
public
const
int
XMLReader::ATTRIBUTE;
public
const
int
XMLReader::TEXT;
public
const
int
XMLReader::CDATA;
public
const
int
XMLReader::ENTITY_REF;
public
const
int
XMLReader::ENTITY;
public
const
int
XMLReader::PI;
public
const
int
XMLReader::COMMENT;
public
const
int
XMLReader::DOC;
public
const
int
XMLReader::DOC_TYPE;
public
const
int
XMLReader::DOC_FRAGMENT;
public
const
int
XMLReader::NOTATION;
public
const
int
XMLReader::WHITESPACE;
public
const
int
XMLReader::SIGNIFICANT_WHITESPACE;
public
const
int
XMLReader::END_ELEMENT;
public
const
int
XMLReader::END_ENTITY;
public
const
int
XMLReader::XML_DECLARATION;
public
const
int
XMLReader::LOADDTD;
public
const
int
XMLReader::DEFAULTATTRS;
public
const
int
XMLReader::VALIDATE;
public
const
int
XMLReader::SUBST_ENTITIES;
/* Properties */
public
int
$attributeCount;
public
string
$baseURI;
public
int
$depth;
public
bool
$hasAttributes;
public
bool
$hasValue;
public
bool
$isDefault;
public
bool
$isEmptyElement;
public
string
$localName;
public
string
$name;
public
string
$namespaceURI;
public
int
$nodeType;
public
string
$prefix;
public
string
$value;
public
string
$xmlLang;
/* Methods */
public true close()
public DOMNodefalse expand(DOMNodenull
$baseNode = null )public stringnull getAttribute(string
$name )public stringnull getAttributeNo(int
$index )public stringnull getAttributeNs(string
$name , string $namespace )public bool getParserProperty(int
$property )public bool isValid()
public stringnull lookupNamespace(string
$prefix )public bool moveToAttribute(string
$name )public bool moveToAttributeNo(int
$index )public bool moveToAttributeNs(string
$name , string $namespace )public bool moveToElement()
public bool moveToFirstAttribute()
public bool moveToNextAttribute()
public bool next(stringnull
$name = null )public static XMLReader open(string
$uri , stringnull $encoding = null , int $flags = 0)public bool open(string
$uri , stringnull $encoding = null , int $flags = 0)public bool read()
public string readInnerXml()
public string readOuterXml()
public string readString()
public bool setParserProperty(int
$property , bool $value )public bool setRelaxNGSchema(stringnull
$filename )public bool setRelaxNGSchemaSource(stringnull
$source )public bool setSchema(stringnull
$filename )public static XMLReader XML(string
$source , stringnull $encoding = null , int $flags = 0)public bool XML(string
$source , stringnull $encoding = null , int $flags = 0)Properties
Predefined ConstantsXMLReader Node Types
XMLReader Parser Options
|