Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #12877

Re: Help with regex

Message-ID <1758310.vLWOEtiJqs@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2014-02-21 02:25 +0100
Subject Re: Help with regex
Newsgroups comp.lang.php
References (4 earlier) <b0d1165d-346c-4c20-bcab-2747c12cfc93@googlegroups.com> <1911532.8bCJ1WhPrK@PointedEars.de> <530514dd$0$9518$9b4e6d93@newsspool1.arcor-online.net> <1479539.WnM6VCZYAS@PointedEars.de> <530676ea$0$9520$9b4e6d93@newsspool1.arcor-online.net>

Show all headers | View raw


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

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Help with regex knal <knalpiap@gmail.com> - 2014-02-19 01:18 -0800
  Re: Help with regex Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-19 15:20 +0100
    Re: Help with regex knal <knalpiap@gmail.com> - 2014-02-19 06:45 -0800
      Re: Help with regex Christoph Michael Becker <cmbecker69@arcor.de> - 2014-02-19 16:11 +0100
        Re: Help with regex knal <knalpiap@gmail.com> - 2014-02-19 07:17 -0800
          Re: Help with regex Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-19 16:37 +0100
            Re: Help with regex Christoph Michael Becker <cmbecker69@arcor.de> - 2014-02-19 21:32 +0100
              Re: Help with regex Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-19 22:28 +0100
                Re: Help with regex Christoph Michael Becker <cmbecker69@arcor.de> - 2014-02-20 22:43 +0100
                Re: Help with regex Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-21 02:25 +0100
                Re: Help with regex Christoph Michael Becker <cmbecker69@arcor.de> - 2014-02-23 17:57 +0100
          Re: Help with regex Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-19 13:48 -0500
          Re: Help with regex "Peter H. Coffin" <hellsop@ninehells.com> - 2014-02-20 00:29 -0600
      Re: Help with regex Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-19 16:30 +0100
    Re: Help with regex The Natural Philosopher <tnp@invalid.invalid> - 2014-02-19 17:42 +0000
      Re: Help with regex Scott Johnson <noonehome@chalupasworld.com> - 2014-02-19 15:38 -0800

csiph-web