> I think what you are looking for is $input2->textContent in PHP.
Hey Andrew (and everyone else was was kind enough to write back) !
Found the solution, this is what i am using (and it works!), and i hope it
helps anyone else who finds themselves in the spot i found myself
$inputs2 = $dom->
Michael A. Peters wrote:
$website_data = new tidy('dom_test.html',$tidy_config);
Doh!
Should be
$website_data = new tidy('dom_test.html',$tidy_config,'utf8');
Otherwise it has the same problem with multibyte characters that
loadHTML() has. But with the 'utf8' specified it works beautifull
On Tue, Feb 2, 2010 at 2:29 PM, Ryan S wrote:
> Hey!
> i'm just starting with PHP's DOM-XML and need a little help please.
>
>
> Basically, first i am trying to see if a input like a textbox has a 'VALUE='
> associated with it, if yes, i leave it be, if no, i add a default value.
>
> This *is wor
Ryan S wrote:
$website_data = file_get_contents('dom_test.html');//load the website data,
$dom = new DomDocument; //make a new DOM container in PHP
$dom->loadHTML($website_data); //load all the fetched data into the DOM
container
I'm not sure what the answer to your issue is, but mind if I
>// I have even tried this instead of the above:
>
>foreach ($inputs2 as $input2) {
>if(!$input2->getAttribute("defaultValue")=="") {
>$input2->setAttribute("defaultValue","it works!");
>}
>}
>
>but no joy.
>
>I'm betting its pretty simple but i dont have a "DOM c
On Tue, 2010-02-02 at 11:29 -0800, Ryan S wrote:
> Hey!
> i'm just starting with PHP's DOM-XML and need a little help please.
>
>
> Basically, first i am trying to see if a input like a textbox has a 'VALUE='
> associated with it, if yes, i leave it be, if no, i add a default value.
>
> This *
Hey!
i'm just starting with PHP's DOM-XML and need a little help please.
Basically, first i am trying to see if a input like a textbox has a 'VALUE='
associated with it, if yes, i leave it be, if no, i add a default value.
This *is working* as can be seen by the attached code below.
But a bit
7 matches
Mail list logo