PHP CSS Selector

Since there's no easiest way of parsing HTML than using css rules ( Xpath is fine too, and it's native ), i implemented Mootools selectors in PHP.For now, i am not specially aiming for perfs, nor complete feature. I just wanted to port a great piece of work on another language. Source on svn
<meta http-equiv="Content-Type" content=" text/html; charset=utf-8"/>
<title>This is a very basic page</title>

<div id="container">
    <div id="header">
        <img src="mylogo.png" id="logo"/>

    <div id="contents" class="box anotherclass">
        <h2>This page is cool</h2>
        <p>This page should be XHTML valid because : </p>
            <li class="box">It respects standarts</li>
            <li>It's written  by me</li>
            <li>It's simple</li>

<p>This is <i>a test <u>of serialisation</u> for <code>$this-&gt;get("text")</code></i>, another node</p>




$url_file =
$doc = simplexml_load_file($url_file, "Element");
$second_reason = $doc->getElement(".box+li");