Finding out about html_doc()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Cruickshank

    Finding out about html_doc()

    Hi

    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:
    domxml_open_mem ($doc,DOMXML_LO AD_RECOVERING)
    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!

    Thanks

    Peter
    --
    Peter Cruickshank
    news at cruickshank dot biz

    PS I originally posted this to alt.comp.lang.p hp but received no response.
  • Peter Cruickshank

    #2
    Re: Finding out about html_doc()

    For the record, the PHP5 equivalent of html_doc() is DOMDocument::lo adHTML()

    And Alexandre is very helpful!

    Cheers

    Peter

    Comment

    Working...