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 #184989 is a reply to message #184968] Sun, 23 February 2014 16:57 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Thomas 'PointedEars' Lahn wrote:

> 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.

I believe you're right, even if the PHP manual doesn't state compliancy
with the W3C DOM API, let alone any particular level or (in lack of a
better word) "section" (with this I mean "Core", "Events" etc.)

>> 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.

With "implicit loading" I meant that a browser makes the current
document accessible via DOM objects and methods.

>>> 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.

I didn't mean to imply that the existance of these features means that
any particular W3C DOM API is available.

--
Christoph M. Becker
[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 16:49:59 GMT 2024

Total time taken to generate the page: 0.04652 seconds