/examples/next.php
PHP | 27 lines | 19 code | 2 blank | 6 comment | 0 complexity | 872526236e5fa98aa89e648799cff859 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>
- <div>
- <button disabled="disabled">First</button> <b>-</b> <span></span></div>
- <div><button>Second</button> - <span></span></div>
- <div><button disabled="disabled">Third</button> - <span></span></div>
- </body>
- </html>
- XML;
- require_once('../src/FluentDOM.php');
- echo FluentDOM($xml)
- ->find('//button[@disabled]')
- ->next()
- ->text('This button is disabled.');
- ?>