phpQuery is a really good tool that has helped me a lot in the past to parse well-formed XHTML and XML documents, but I recently ran into a problem trying to select elements that have colons in their tag, for example:
<isc:thumb><![CDATA[http://example.com/foo_thumb.jpg]]></isc:thumb>
I tried using a function pq()to select all of these items:
foreach ( pq("isc:thumb") as $thumbnail ) {
print pq( $thumbnail )->text();
}
Unfortunately, this does nothing. If I try another element, such as a tag id, the results will appear as expected.
source
share