read()){if($reader->nodeType==XMLREADE">
时间:2021-07-01 10:21:17 帮助过:2人阅读
open("1.xml");
while($reader->read()){
if($reader->nodeType==XMLREADER::ELEMENT) {
if ($reader->localName == "humans") {
//已经能进if语句,但是获取不了value
echo $reader->value;
}
}
}
?>
XML文件1.xml:
hello
$reader->value无效,什么原因?请教!
open("1.xml");
while($reader->read()){
if($reader->nodeType==XMLREADER::ELEMENT) {
if ($reader->localName == "humans") {
//已经能进if语句,但是获取不了value
echo $reader->value;
}
}
}
?>
XML文件1.xml:
hello
$reader->value无效,什么原因?请教!
if语句少了$reader->read();