Re: [PHP] loadHTML()

2007-12-25 Thread Jochem Maas
M5 schreef: > OK, I already knew that making it valid doesn't change the result. But > the question remains, how to parse the HTML as it arrives (which I have > no control over anyway), besides doing a str_replace on and > inserting a token, which I later replace (which I shouldn't have to, > righ

Re: [PHP] loadHTML()

2007-12-24 Thread M5
OK, I already knew that making it valid doesn't change the result. But the question remains, how to parse the HTML as it arrives (which I have no control over anyway), besides doing a str_replace on and inserting a token, which I later replace (which I shouldn't have to, right?) ...Rene

Re: [PHP] loadHTML()

2007-12-24 Thread Casey
Actually, never mind. It does not have to be valid to work. On Dec 24, 2007, at 6:15 PM, Casey <[EMAIL PROTECTED]> wrote: That's because it's not proper XHTML: "" should be "". On Dec 24, 2007, at 6:03 PM, M5 <[EMAIL PROTECTED]> wrote: Just getting into DOMDocument()... I'm loading an HTM

Re: [PHP] loadHTML()

2007-12-24 Thread Casey
That's because it's not proper XHTML: "" should be "". On Dec 24, 2007, at 6:03 PM, M5 <[EMAIL PROTECTED]> wrote: Just getting into DOMDocument()... I'm loading an HTML page and trying to extract certain bits of text. Just one problem: loadHTML() seems to ignore orphan tags like ''. For ex

[PHP] loadHTML()

2007-12-24 Thread M5
Just getting into DOMDocument()... I'm loading an HTML page and trying to extract certain bits of text. Just one problem: loadHTML() seems to ignore orphan tags like ''. For example, in the following HTML: Some text is here. New line. Another new line. Some text is here. New line. An

[PHP] loadHTML/loadHTMLFile - DOM functions

2006-09-15 Thread Leonidas Safran
Hello all, Again a question on the new DOM functions... The loadHTML function doesn't support any attribute and I'm wondering how to handle non-text content. Image tags from source webpage are loaded as "objects" or whatever; they appear as special chars("show source" from browser shows big em