Enhanced XML creation, and so on.

This commit is contained in:
Michael Vogel 2016-07-17 19:42:30 +02:00
parent bc2c565060
commit d7f093cb2e
2 changed files with 103 additions and 111 deletions

View file

@ -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;