tidy_get_body

(no version information, might be only in CVS)

tidy_get_body --  Retourne un objet TidyNode, commencé à partir de la balise <body>

Description

object tidy_get_body ( resource tidy)

tidy_get_body() retourne un objet TidyNode commençant à partir de la balise <body>.

Exemple 1. Exemple avec tidy_get_body()

<?php
$html
= '
<html>
<head>
  <title>test</title>
</head>
<body>
  <p>paragraph</p>
</body>
</html>'
;

$tidy = tidy_parse_string($html);

$body = tidy_get_body($tidy);
echo
$body->value;
?>

L'exemple ci-dessus affichera :

<body>
 <p>paragraph</p>
</body>

Note : Cette fonction n'est disponible qu'avec Zend Engine 2, cela signifie PHP >= 5.0.0.

Voir aussi tidy_get_head() et tidy_get_html().