PageRenderTime 37ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/FluentDOM/examples/next.php

https://github.com/cceh/atom
PHP | 27 lines | 19 code | 2 blank | 6 comment | 0 complexity | f0c56a775f37d08671d40699407d6c14 MD5 | raw file
Possible License(s): CC-BY-3.0, AGPL-3.0, MIT, ISC
  1. <?php
  2. /**
  3. *
  4. * @version $Id: next.php 322 2009-09-14 20:19:48Z subjective $
  5. * @license http://www.opensource.org/licenses/mit-license.php The MIT License
  6. * @copyright Copyright (c) 2009 Bastian Feder, Thomas Weinert
  7. */
  8. header('Content-type: text/plain');
  9. $xml = <<<XML
  10. <html>
  11. <head></head>
  12. <body>
  13. <div>
  14. <button disabled="disabled">First</button> <b>-</b> <span></span></div>
  15. <div><button>Second</button> - <span></span></div>
  16. <div><button disabled="disabled">Third</button> - <span></span></div>
  17. </body>
  18. </html>
  19. XML;
  20. require_once('../FluentDOM.php');
  21. echo FluentDOM($xml)
  22. ->find('//button[@disabled]')
  23. ->next()
  24. ->text('This button is disabled.');
  25. ?>