ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
XMLReader扩展是XML Pull解析器。阅读器充当光标,在文档流上前进,并在途中的每个节点处停止。与XML Writer配套 ## 编码 重要的是要注意,在内部,libxml使用UTF-8编码,因此,检索到的内容的编码将始终采用UTF-8编码 该扩展需要[libxml](https://www.php.net/manual/en/book.libxml.php)PHP扩展 * [XMLReader :: close](https://www.php.net/manual/en/xmlreader.close.php)—关闭XMLReader输入 * [XMLReader :: expand](https://www.php.net/manual/en/xmlreader.expand.php)—返回当前节点的副本作为DOM对象 * [XMLReader :: getAttribute](https://www.php.net/manual/en/xmlreader.getattribute.php)—获取命名属性的值 * [XMLReader :: getAttributeNo](https://www.php.net/manual/en/xmlreader.getattributeno.php)—通过索引获取属性的值 * [XMLReader :: getAttributeNs](https://www.php.net/manual/en/xmlreader.getattributens.php)—通过本地名称和URI获取属性的值 * [XMLReader :: getParserProperty](https://www.php.net/manual/en/xmlreader.getparserproperty.php)—指示是否已设置指定的属性 * [XMLReader :: isValid](https://www.php.net/manual/en/xmlreader.isvalid.php)—指示解析的文档是否有效 * [XMLReader :: lookupNamespace](https://www.php.net/manual/en/xmlreader.lookupnamespace.php)—前缀的查找名称空间 * [XMLReader :: moveToAttribute](https://www.php.net/manual/en/xmlreader.movetoattribute.php)—将光标移动到命名属性 * [XMLReader :: moveToAttributeNo](https://www.php.net/manual/en/xmlreader.movetoattributeno.php)—按索引将光标移动到属性 * [XMLReader :: moveToAttributeNs](https://www.php.net/manual/en/xmlreader.movetoattributens.php)—将光标移动到命名属性 * [XMLReader :: moveToElement](https://www.php.net/manual/en/xmlreader.movetoelement.php)—将光标置于当前属性的父元素上 * [XMLReader :: moveToFirstAttribute](https://www.php.net/manual/en/xmlreader.movetofirstattribute.php)—将光标放在第一个属性上 * [XMLReader :: moveToNextAttribute](https://www.php.net/manual/en/xmlreader.movetonextattribute.php)—将光标置于下一个属性上 * [XMLReader :: next](https://www.php.net/manual/en/xmlreader.next.php)—将光标移到下一个节点,跳过所有子树 * [XMLReader :: open](https://www.php.net/manual/en/xmlreader.open.php)—设置包含要解析的XML的URI * [XMLReader :: read](https://www.php.net/manual/en/xmlreader.read.php)—移动到文档中的下一个节点 * [XMLReader :: readInnerXml](https://www.php.net/manual/en/xmlreader.readinnerxml.php)—从当前节点检索XML * [XMLReader :: readOuterXml](https://www.php.net/manual/en/xmlreader.readouterxml.php)—从当前节点(包括自身)检索XML * [XMLReader :: readString](https://www.php.net/manual/en/xmlreader.readstring.php)—以字符串形式读取当前节点的内容 * [XMLReader :: setParserProperty-](https://www.php.net/manual/en/xmlreader.setparserproperty.php)设置解析器选项 * [XMLReader :: setRelaxNGSchema](https://www.php.net/manual/en/xmlreader.setrelaxngschema.php)—设置RelaxNG模式的文件名或URI * [XMLReader :: setRelaxNGSchemaSource](https://www.php.net/manual/en/xmlreader.setrelaxngschemasource.php)—设置包含RelaxNG模式的数据 * [XMLReader :: setSchema](https://www.php.net/manual/en/xmlreader.setschema.php)—针对XSD验证文档 * [XMLReader :: XML](https://www.php.net/manual/en/xmlreader.xml.php)—设置包含要解析的XML的数据