FlexIDK
Новичок
DOM - получение атрибутов
как получить атрибуты в php4
$DOM = domxml_open_file($XMLfile);
$root = $DOM->document_element();
$childnodes = $root->child_nodes();
foreach ($childnodes as $value) {
$attributes = $value->attributes();
print_r ($attributes);
print_r ($value);
#echo $value->tagname . " : " .iconv("UTF-8", "WINDOWS-1251", $value->get_content()). "<br>";
}
делаю так... print_r атрибутов выводит
[0] => domattribute Object
(
[type] => 2
[name] => id
[value] => 1
[0] => 39
[1] => 138651776
)
[1] => domattribute Object
(
[type] => 2
[name] => parentid
[value] => 1
[0] => 40
[1] => 138651904
)
как получить атрибуты ?! имя и значение?!
как получить атрибуты в php4
$DOM = domxml_open_file($XMLfile);
$root = $DOM->document_element();
$childnodes = $root->child_nodes();
foreach ($childnodes as $value) {
$attributes = $value->attributes();
print_r ($attributes);
print_r ($value);
#echo $value->tagname . " : " .iconv("UTF-8", "WINDOWS-1251", $value->get_content()). "<br>";
}
делаю так... print_r атрибутов выводит
[0] => domattribute Object
(
[type] => 2
[name] => id
[value] => 1
[0] => 39
[1] => 138651776
)
[1] => domattribute Object
(
[type] => 2
[name] => parentid
[value] => 1
[0] => 40
[1] => 138651904
)
как получить атрибуты ?! имя и значение?!