Rapide Advanced Adulte
 
 Web|Image|Shop|Video|News|Wmx|Mobile|Wiki|Ajouter ce moteur

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.SimpleXMLElement->addAttribute()
.SimpleXMLElement->addChild()
.SimpleXMLElement->asXML()
.SimpleXMLElement->attributes()
.SimpleXMLElement->children()
.SimpleXMLElement-> construct()
.SimpleXMLElement->getDocNamespaces()
.SimpleXMLElement->getName()
.SimpleXMLElement->getNamespaces()
.SimpleXMLElement->registerXPathNamespace()
.SimpleXMLElement->xpath()
.simplexml import dom
.simplexml load file
.simplexml load string
 
   

  simplexml_import_dom  


simplexml_import_dom

(PHP 5)

simplexml_import_dom -- Construit un objet SimpleXMLElement à partir d'une node DOM

Description

SimpleXMLElement simplexml_import_dom ( DOMNode node [, string class_name] )

Cette fonction prend une node d'un document DOM et la transforme en node SimpleXML. Ce nouvel objet peut alors être utilisé comme un élément natif SimpleXML.

Liste de paramètres

node

Un élémént node DOM

class_name

Vous pouvez utiliser ce paramètre optionnel afin que simplexml_load_string() retourne un objet de la classe spécifiée. Cette classe doit étendre la classe SimpleXMLElement.

Valeurs de retour

Retourne un SimpleXMLElement ou FALSE si une erreur survient.

Exemples

Exemple 1. Import DOM

<?php
$dom
= new DOMDocument;
$dom->loadXML('<books><book><title>blah</title></book></books>');
if (!
$dom) {
    echo
'Erreur durant l'analyse du document';
    exit;
}

$s = simplexml_import_dom($dom);

echo $s->book[0]->title; // blah
?>


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur
.