At 10:02 PM +0200 9/13/06, Leonidas Safran wrote:
Hello Tedd,
Interesting -- it doesn't work for me. I keep getting --
Parse error: parse error, unexpected T_OBJECT_OPERATOR
-- in your if statement. But, I don't see the problem.
Maybe it has something to do with your php version. I h
Hello Tedd,
> Interesting -- it doesn't work for me. I keep getting --
> Parse error: parse error, unexpected T_OBJECT_OPERATOR
> -- in your if statement. But, I don't see the problem.
Maybe it has something to do with your php version. I have php 5.04 installed
(Fedora Core 4 rpm package).
H
At 12:07 AM +0200 9/13/06, Leonidas Safran wrote:
Hello all,
I have found a way...
$doc = new DomDocument();
$doc->loadHTMLFile($source["url"]);
$elements = $doc->getElementsByTagName("tr");
$i = 0;
while( $elements->item($i) ){
if( $elements->item($i)->hasAttributes() &&
preg_match("/td[0|
Hello all,
I have found a way...
$doc = new DomDocument();
$doc->loadHTMLFile($source["url"]);
$elements = $doc->getElementsByTagName("tr");
$i = 0;
while( $elements->item($i) ){
if( $elements->item($i)->hasAttributes() &&
preg_match("/td[0|1]/",$elements->item($i)->getAttribute("id")) > 0 ){
Hello Satyam,
> That is correct but it is not complete. Everything that relies
> on a unique id would fail, CSS amongst others(which is what this
> article covers), but not the only one.
> Basically there are two functions to get elements by id or name:
> getElementById and getElementsByName.
- Original Message -
From: "Leonidas Safran" <[EMAIL PROTECTED]>
By the way, because I found it strange to have more than one field with
the same id, I looked on the famous selfhtml tutorial website
http://de.selfhtml.org which says that unique id is only mandatory for
css, but not fo
Hello Satyam,
Thanks for your answering...
>> I don't really get it to work with that functions from
>> http://www.php.net/manual/en/ref.dom.php
>> I try to get the content of fields on an external html page, where
>> I just know some ids of the rows.
>> Example:
>> ...
>>
>> 1234
>>
>>
>>
To start with, an ID should never be repeated. A name can be repeated, an
ID shouldn't. That is why there is a function to get an array of elements
with a certain name but there is none to get a list of elements with the
same ID simply because there shouldn't be any. Something helpful in
tr
8 matches
Mail list logo