Loop over DOMDocument
- by Zoredache
I am following the suggestion from this question Robust, Mature HTML Parser for PHP, about parsing html that may be malformed with DOMDocument.
Is there any easy way to loop over the parsed document? So I would like to loop over html like this.
$html='<ul>
<li>value1</li>
<li>value1</li>
…