Re: Simple XML, (x)html, and xpath
| From: | Gary | Date: | Tue, 29 May 2012 12:40:22 +0000 |
| Subject: | Re: Simple XML, (x)html, and xpath | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318013@lists.php.net to get a copy of this message | ||
Andrew Ballard wrote:
> On Fri, May 25, 2012 at 3:57 AM, Gary
> wrote:
>> If I use simplexml_load_string to create an XML object
[...]
>> I cannot seem to get anything out of an xpath expression, no matter
>> what I try.
>>
>> If, however, I remove the
>> 'xmlns="http://www.w3.org/1999/xhtml"' in
> the
>> html element, it works fine.
> I am not sure what you have tried, but namespaces change everything in
> XPath compared to documents without them.
I tried the simplest thnig I could think would work. I didn't know about
the namespaces thing (I haven't had a lot to do with xpath
before). Thanks. I'll sort something out from that info.
--
Gary Please do NOT send me 'courtesy' replies off-list.