XMLReaderTable of Contents
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 synopsisXMLReader
class XMLReader
{
/* Constants */
const
int
XMLReader::NONE
= 0
;
const
int
XMLReader::ELEMENT
= 1
;
const
int
XMLReader::ATTRIBUTE
= 2
;
const
int
XMLReader::TEXT
= 3
;
const
int
XMLReader::CDATA
= 4
;
const
int
XMLReader::ENTITY_REF
= 5
;
const
int
XMLReader::ENTITY
= 6
;
const
int
XMLReader::PI
= 7
;
const
int
XMLReader::COMMENT
= 8
;
const
int
XMLReader::DOC
= 9
;
const
int
XMLReader::DOC_TYPE
= 10
;
const
int
XMLReader::DOC_FRAGMENT
= 11
;
const
int
XMLReader::NOTATION
= 12
;
const
int
XMLReader::WHITESPACE
= 13
;
const
int
XMLReader::SIGNIFICANT_WHITESPACE
= 14
;
const
int
XMLReader::END_ELEMENT
= 15
;
const
int
XMLReader::END_ENTITY
= 16
;
const
int
XMLReader::XML_DECLARATION
= 17
;
const
int
XMLReader::LOADDTD
= 1
;
const
int
XMLReader::DEFAULTATTRS
= 2
;
const
int
XMLReader::VALIDATE
= 3
;
const
int
XMLReader::SUBST_ENTITIES
= 4
;
/* Properties */
public
readonly
int
$attributeCount
;
public
readonly
string
$baseURI
;
public
readonly
int
$depth
;
public
readonly
bool
$hasAttributes
;
public
readonly
bool
$hasValue
;
public
readonly
bool
$isDefault
;
public
readonly
bool
$isEmptyElement
;
public
readonly
string
$localName
;
public
readonly
string
$name
;
public
readonly
string
$namespaceURI
;
public
readonly
int
$nodeType
;
public
readonly
string
$prefix
;
public
readonly
string
$value
;
public
readonly
string
$xmlLang
;
/* Methods */
public bool close
( void
)
public
DOMNode
expand
([ DOMNode
$basenode
] )
public
string
getAttribute
( string
$name
)
public
string
getAttributeNo
( int
$index
)
public string getAttributeNs
( string
$localName
, string $namespaceURI
)
public bool getParserProperty
( int
$property
)
public bool isValid
( void
)
public
string
lookupNamespace
( string
$prefix
)
public
bool
moveToAttribute
( string
$name
)
public
bool
moveToAttributeNo
( int
$index
)
public
bool
moveToAttributeNs
( string
$localName
, string $namespaceURI
)
public bool moveToElement
( void
)
public bool moveToFirstAttribute
( void
)
public bool moveToNextAttribute
( void
)
public
bool
next
([ string
$localname
] )
public
bool
open
( string
$URI
[, string $encoding
[, int $options = 0
]] )
public bool read
( void
)
public string readInnerXML
( void
)
public string readOuterXML
( void
)
public string readString
( void
)
public
bool
setParserProperty
( int
$property
, bool $value
)
public
bool
setRelaxNGSchema
( string
$filename
)
public
bool
setRelaxNGSchemaSource
( string
$source
)
public bool setSchema
( string
$filename
)
public
bool
xml
( string
}$source
[, string $encoding
[, int $options = 0
]] )Properties
Predefined ConstantsXMLReader Node Types
XMLReader Parser Options
|