/vendor/FluentDOM/examples/empty.php
PHP | 24 lines | 16 code | 2 blank | 6 comment | 0 complexity | 30a9647977f750cbd49bfbf3d5431f5f MD5 | raw file
Possible License(s): CC-BY-3.0, AGPL-3.0, MIT, ISC
- <?php
- /**
- *
- * @version $Id: empty.php 322 2009-09-14 20:19:48Z subjective $
- * @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('../FluentDOM.php');
- echo FluentDOM($xml)
- ->find('//p[@class = "first"]')
- ->empty();
- ?>