* fixes
git-svn-id: svn://netflint.net/xmpphp@14 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
17
xmlobj.php
17
xmlobj.php
@@ -45,6 +45,23 @@ class XMLObj {
|
||||
}
|
||||
}
|
||||
|
||||
function tostring($str='') {
|
||||
$str .= "<{$this->name} xmlns='{$this->ns}' ";
|
||||
foreach($this->attrs as $key => $value) {
|
||||
if($key != 'xmlns') {
|
||||
$value = htmlentities($value);
|
||||
$str .= "$key='$value' ";
|
||||
}
|
||||
}
|
||||
$str .= ">";
|
||||
foreach($this->subs as $sub) {
|
||||
$str .= $sub->tostring();
|
||||
}
|
||||
$body = htmlentities($this->data);
|
||||
$str .= "$body</{$this->name}>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
function hassub($name) {
|
||||
foreach($this->subs as $sub) {
|
||||
if($sub->name == $name) return True;
|
||||
|
Reference in New Issue
Block a user