FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Help with regex
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Help with regex [message #184968 is a reply to message #184967] Fri, 21 February 2014 01:25 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Christoph Michael Becker wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Christoph Michael Becker wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> knal wrote:
>>>> > Could you please give a little more direction on the DOM?
>>>> I presume he could.
>>>
>>> Actually, I have not yet used PHP's DOM extension. However, it should
>>> not be too different from other DOM implementations, so basically it
>>> comes down to load an HTML document and than use XPath to get the
>>> desired information. The mentioned keywords should be sufficient to
>>> search the web -- at least for some first steps.
>>
>> However, implementations of the W3C DOM Core API do not require a way so
>> that a document tree can be built from source code, nor is XPath support
>> required.
>
> I was not explicitly speaking about the DOM *Core* API,

But that is PHP’s implementation. DOMXPath resembles, but does not conform
to, DOM3 XPath.

> but rather of DOM implementations in a broad sense. As you surely are
> aware, there is the DOM Level 3 Load and Save Specification[1] as well as
> the XML Path Language (XPath) Version 1.0[2], both of which are W3C
> recommendations since a long time.

And both of which are *optional*. PHP implements none of them, but it
supports alternative ways.

> While XPath support might be missing from some "DOM"
> implementations, either implicit or explicit loading of a document
> source most likely won't (otherwise the implementation would not allow
> to work with existing document sources, and as such would not be too
> useful).

Your logic is flawed. For example, the W3C DOM implementation in browsers
does not always have such a way.

>> So you had better RTFM yourself before making the suggestion.
>
> I had glimpsed over the manual and found DOMDocument::loadHTML()[3] as
> well as DOMXPath[4]...

Non sequitur.


PointedEars
--
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
-- Richard Cornford, comp.lang.javascript, 2011-11-14
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Career Opportunities in Singapore (PHP Tech Lead)
Next Topic: PHP script to get name of file which houses the script?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 18:44:00 GMT 2024

Total time taken to generate the page: 0.04565 seconds