FluentDOM /examples/empty.php

Language PHP Lines 24
MD5 Hash aaf383a99d875c1d854b7d5bdcfd6e9d Estimated Cost $306 (why?)
Repository git://github.com/ThomasWeinert/FluentDOM.git View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
*
* @version $Id$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @copyright Copyright (c) 2009 Bastian Feder, Thomas Weinert
*/
header('Content-type: text/plain');

$xml = <<<XML
<html>
<head></head>
<body>
  <p class="first">Hello One</p>
  <p>Hello Two</p>
</body>
</html>
XML;

require_once('../src/FluentDOM.php');
echo FluentDOM($xml)
  ->find('//p[@class = "first"]')
  ->empty();
?>
Back to Top