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

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.DomAttribute->name
.DomAttribute->set value
.DomAttribute->specified
.DomAttribute->value
.DomDocument->add root
.DomDocument->create attribute
.DomDocument->create cdata section
.DomDocument->create comment
.DomDocument->create element ns
.DomDocument->create element
.DomDocument->create entity reference
.DomDocument->create processing instruction
.DomDocument->create text node
.DomDocument->doctype
.DomDocument->document element
.DomDocument->dump file
.DomDocument->dump mem
.DomDocument->get element by id
.DomDocument->get elements by tagname
.DomDocument->html dump mem
.DomDocument->xinclude
.DomDocumentType->entities()
.DomDocumentType->internal subset()
.DomDocumentType->name()
.DomDocumentType->notations()
.DomDocumentType->public id()
.DomDocumentType->system id()
.DomElement->get attribute node()
.DomElement->get attribute()
.DomElement->get elements by tagname()
.DomElement->has attribute()
.DomElement->remove attribute()
.DomElement->set attribute node()
.DomElement->set attribute()
.DomElement->tagname()
.DomNode->add namespace
.DomNode->append child
.DomNode->append sibling
.DomNode->attributes
.DomNode->child nodes
.DomNode->clone node
.DomNode->dump node
.DomNode->first child
.DomNode->get content
.DomNode->has attributes
.DomNode->has child nodes
.DomNode->insert before
.DomNode->is blank node
.DomNode->last child
.DomNode->next sibling
.DomNode->node name
.DomNode->node type
.DomNode->node value
.DomNode->owner document
.DomNode->parent node
.DomNode->prefix
.DomNode->previous sibling
.DomNode->remove child
.DomNode->replace child
.DomNode->replace node
.DomNode->set content
.DomNode->set name
.DomNode->set namespace
.DomNode->unlink node
.DomProcessingInstruction->data
.DomProcessingInstruction->target
.DomXsltStylesheet->process()
.DomXsltStylesheet->result dump file()
.DomXsltStylesheet->result dump mem()
.domxml new doc
.domxml open file
.domxml open mem
.domxml version
.domxml xmltree
.domxml xslt stylesheet doc
.domxml xslt stylesheet file
.domxml xslt stylesheet
.domxml xslt version
.xpath eval expression
.xpath eval
.xpath new context
.xpath register ns auto
.xpath register ns
.xptr eval
.xptr new context
 
   

  xpath_eval_expression  


xpath_eval_expression

(PHP 4 >= 4.0.4, PECL)

xpath_eval_expression --  Calcule un chemin XPath à partir d'une chaîne

Description

class XPathContext {

XPathObject xpath_eval_expression ( string expression [, domnode contextnode] )

}XPathObject xpath_eval_expression ( XPathContext xpath_context, string expression [, domnode contextnode] )

Exemple 1. Exemple avec xpath_eval_expression()

<?php

include("example.inc");

if (!
$dom = domxml_open_mem($xmlstr)) {
    echo
"Erreur lors de l'analyse du document\n";
    exit;
}

$xpath = xpath_new_context($dom);
var_dump(xpath_eval_expression($xpath, '/chapter/@language'));

?>

L'exemple ci-dessus va afficher :

object(XPathObject)(2) {
   ["type"]=>
   int(1)
   ["nodeset"]=>
   array(1) {
     [0]=>
     object(domattribute)(5) {
       ["type"]=>
       int(2)
       ["name"]=>
       string(8) "language"
       ["value"]=>
       string(2) "en"
       [0]=>
       int(7)
       [1]=>
       int(138004256)
     }
  }
}

Voir aussi xpath_eval().


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur
.