468,315 Members | 1,418 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,315 developers. It's quick & easy.

Finding out about html_doc()


I'm trying to get some PHP4 code working on PHP5 - and am having an
issue with a part of the code that uses html_doc() to turn html text
scraped from a website into something that can be processed by DomXml
functions like xpath_eval()

I've found a nice looking wrapper at
which seems like it should do PHP4<->PHP5 work, except that it doesnt
support html_doc().

I've tried replacing html_doc() with:
but I can't get that to work even with the PHP4 - is that down to
validation errors in the HTML?

My problem is that I can't find any documentation to explain what
html_doc() is meant to do and I'm new to the details of domxml coding
(though I know what an XPath is...)

In summary, two questions:
- can I use domxml_open_mem() as a replacement for html_doc() in
PHP4/domxml. If so, how?
- where can I find documentation on html_doc()?

I've googled, searched php.net and looked through group archives and can't
find anything - any ideas or information welcomed!


Peter Cruickshank
news at cruickshank dot biz

PS I originally posted this to alt.comp.lang.php but received no response.
Mar 1 '06 #1
1 1480
For the record, the PHP5 equivalent of html_doc() is DOMDocument::loadHTML()

And Alexandre is very helpful!



Mar 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by KL | last post: by
9 posts views Thread by Laurent Bugnion | last post: by
15 posts views Thread by cwsullivan | last post: by
2 posts views Thread by ElkGroveR | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
7 posts views Thread by Nick | last post: by
275 posts views Thread by Astley Le Jasper | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.