|
tidyNode::isHtmlChecks if a node is an element node Description
public bool tidyNode::isHtml()
Tells if the node is an element node, but not the root node of the document. ParametersThis function has no parameters. Return Values
Returns Changelog
Examples
Example #1 Extract HTML code from a mixed HTML document The above example will output:
# html node #1
<html>
<head>
<?php echo '<title>title</title>'; ?><#
/* JSTE code */
alert('Hello World');
#>
<title></title>
</head>
<body>
<?php
// PHP code
echo 'hello world!';
?><%
/* ASP code */
response.write("Hello World!")
%><!-- Comments -->
Hello WorldOutside HTML
</body>
</html>
# html node #2
<head>
<?php echo '<title>title</title>'; ?><#
/* JSTE code */
alert('Hello World');
#>
<title></title>
</head>
# html node #3
<title></title>
# html node #4
<body>
<?php
// PHP code
echo 'hello world!';
?><%
/* ASP code */
response.write("Hello World!")
%><!-- Comments -->
Hello WorldOutside HTML
</body>
|