/examples/empty.php
http://github.com/ThomasWeinert/FluentDOM · PHP · 24 lines · 16 code · 2 blank · 6 comment · 0 complexity · aaf383a99d875c1d854b7d5bdcfd6e9d MD5 · raw file
- <?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();
- ?>