PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 1ms RepoModel.GetById 40ms app.codeStats 0ms

/examples/empty.php

http://github.com/ThomasWeinert/FluentDOM
PHP | 24 lines | 16 code | 2 blank | 6 comment | 0 complexity | aaf383a99d875c1d854b7d5bdcfd6e9d MD5 | raw file
 1<?php
 2/**
 3*
 4* @version $Id$
 5* @license http://www.opensource.org/licenses/mit-license.php The MIT License
 6* @copyright Copyright (c) 2009 Bastian Feder, Thomas Weinert
 7*/
 8header('Content-type: text/plain');
 9
10$xml = <<<XML
11<html>
12<head></head>
13<body>
14  <p class="first">Hello One</p>
15  <p>Hello Two</p>
16</body>
17</html>
18XML;
19
20require_once('../src/FluentDOM.php');
21echo FluentDOM($xml)
22  ->find('//p[@class = "first"]')
23  ->empty();
24?>