downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SimpleXMLElement::getNamespaces> <SimpleXMLElement::getDocNamespaces
Last updated: Fri, 14 Aug 2009

view this page in

SimpleXMLElement::getName

(PHP 5 >= 5.1.3)

SimpleXMLElement::getNameRécupère le nom d'un élément XML

Description

SimpleXMLElement
string getName ( void )

Récupère le nom d'un élément XML.

Valeurs de retour

La méthode getName retourne un nom sous la forme de chaîne de caractères d'une balise XML référencé par l'objet SimpleXMLElement.

Exemples

Exemple #1 Récupère les noms des éléments XML

<?php

$sxe 
= new SimpleXMLElement($xmlstr);

echo 
$sxe->getName() . "\n";

foreach (
$sxe->children() as $child)
{
    echo 
$child->getName() . "\n";
}

?>



add a note add a note User Contributed Notes
SimpleXMLElement::getName
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites