« Programmation PHP/Exemples/DomXml » : différence entre les versions
Contenu supprimé Contenu ajouté
m Robot : ajoute Catégorie:Programmation PHP (livre) |
|||
Ligne 11 :
== Écriture d'un xml complexe ==
* Écriture d'un
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<root>
<tag1 m1="attTag1" m2="att2">
<sous-tag1>texte sous-tag1 <sous-tag2></sous-tag2> texte tag1 </sous-tag1> </tag1>
<tag1>
<sous-tag1>texte sous-tag1
<sous-tag2 att1="att2" att3="att3"></sous-tag2> </sous-tag1> <tag3>
<sous-tag1>texte sous-tag1 < </sous-tag1>
<etEncoreUnTagSuperflu> <sous-tag1>texte sous-tag1 <sous-tag2>test</sous-tag2> </sous-tag1> <tag1>
<p><b><sous-tag1>texte sous-tag1 <sous-tag2 att1="attribut1" /></b> </sous-tag1> ceci</p>est du body texte à extraire
</tag1>
|