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

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.XSLTProcessor:: construct
.XSLTProcessor::getParameter
.XSLTProcessor::hasExsltSupport
.XSLTProcessor::importStylesheet
.XSLTProcessor::registerPHPFunctions
.XSLTProcessor::removeParameter
.XSLTProcessor::setParameter
.XSLTProcessor::transformToDoc
.XSLTProcessor::transformToURI
.XSLTProcessor::transformToXML
 
   

  xsl_xsltprocessor_transform_to_xml  


XSLTProcessor::transformToXML

(no version information, might be only in CVS)

XSLTProcessor::transformToXML -- Transforme en XML

Description

class XSLTProcessor {

string transformToXML ( DOMDocument doc )

}

Transforme le noeud source en une chaîne en y appliquant une feuille de style donnée par la méthode XSLTProcessor::importStylesheet.

Liste de paramètres

doc

Le document transformé.

Valeurs de retour

Le résultat de la transformation en tant que chaîne de caractères ou FALSE si une erreur survient.

Exemples

Exemple 1. Transformation d'une chaîne

<?php

// CHargement du source XML
$xml = new DOMDocument;
$xml->load('collection.xml');

$xsl = new DOMDocument;
$xsl->load('collection.xsl');

// Configuration du transformateur
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attachement des règles xsl

echo $proc->transformToXML($xml);

?>

L'exemple ci-dessus va afficher :

Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!

<h1>Fight for your mind</h1><h2>by Ben Harper - 1995</h2><hr>
<h1>Electric Ladyland</h1><h2>by Jimi Hendrix - 1997</h2><hr>


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur
.