mirror of
https://github.com/friendica/friendica
synced 2025-05-02 15:04:22 +02:00
Enhanced XML creation, and so on.
This commit is contained in:
parent
bc2c565060
commit
d7f093cb2e
2 changed files with 103 additions and 111 deletions
|
@ -47,6 +47,15 @@ class xml {
|
|||
}
|
||||
|
||||
foreach($array as $key => $value) {
|
||||
if (!isset($element) AND isset($xml))
|
||||
$element = $xml;
|
||||
|
||||
if (is_integer($key)) {
|
||||
if (isset($element))
|
||||
$element[0] = $value;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (substr($key, 0, 11) == "@attributes") {
|
||||
if (!isset($element) OR !is_array($value))
|
||||
continue;
|
||||
|
@ -58,7 +67,7 @@ class xml {
|
|||
else
|
||||
$namespace = NULL;
|
||||
|
||||
$element->addAttribute ($attr_key, $attr_value, $namespace);
|
||||
$element->addAttribute($attr_key, $attr_value, $namespace);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue