public function QueryPath::innerXML in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::innerXML()
- 7.2 QueryPath/QueryPath.php \QueryPath::innerXML()
1 call to QueryPath::innerXML()
- QueryPath::innerHTML in QueryPath/
QueryPath.php
File
- QueryPath/
QueryPath.php, line 1209
Class
Code
public function innerXML() {
$length = $this
->size();
if ($length == 0) {
return NULL;
}
$first = $this
->getFirstMatch();
if (!$first instanceof DOMNode) {
return NULL;
}
elseif (!$first
->hasChildNodes()) {
return '';
}
$buffer = '';
foreach ($first->childNodes as $child) {
$buffer .= $this->document
->saveXML($child);
}
return $buffer;
}