FluentDOM
[ class tree: FluentDOM ] [ index: FluentDOM ] [ all elements ]

Usage Example: FluentDOM::next()

  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.  
  10. $xml = <<<XML
  11. <html>
  12. <head></head>
  13. <body>
  14.   <div>
  15.     <button disabled="disabled">First</button> <b>-</b> <span></span></div>
  16.   <div><button>Second</button> - <span></span></div>
  17.   <div><button disabled="disabled">Third</button> - <span></span></div>
  18. </body>
  19. </html>
  20. XML;
  21.  
  22. require_once('../FluentDOM.php');
  23. echo FluentDOM($xml)
  24.   ->find('//button[@disabled]')
  25.   ->next()
  26.   ->text('This button is disabled.');
  27. ?>

Documentation generated on Sun, 26 Sep 2010 01:00:49 +0200 by phpDocumentor 1.4.3