Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

DomNode->attributes

(no version information, might be only in CVS)

DomNode->attributes --  Returns list of attributes

Описание

array DomNode->attributes ( void )

This function only returns an array of attributes if the node is of type XML_ELEMENT_NODE.

(PHP >= 4.3 only) If no attributes are found, NULL is returned.



add a note add a note User Contributed Notes
DomNode->attributes
Ian Monroe
29-Nov-2005 08:03
A function to get the value of an attribute given the name of the desired attribute and the results of attributes() to the second parameter.
<?php
function getAttribute($name, $att)
{
    foreach(
$att as $i)
    {
        if(
$i->name()==$name)
            return
$i->value();       
    }
}
?>
steve at realappraiser dot net
05-Jan-2005 12:41
$xpath = $parseDoc->xpath_new_context($parseDoc);      
$getResultSearch = $xpath->xpath_eval("//PROPERTY_INFORMATION_RESPONSE/_PRODUCT");
$nodesetResult = $getResultSearch->nodeset;
$var1=$getResultSearch->nodeset[0]->attributes() ;
implode($var1);
print_r ($var1 )  ;

// it prints something like this:::::

Array ( [0] => domattribute Object ( [type] => 2 [name] => _PrettyAttr [value] => Y [0] => 26 [1] => 161068800 ) )

DomNode->child_nodes> <DomNode->append_sibling
Last updated: Fri, 26 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571