in reply to Looking for a XPATH-like tool for HTML documents

Use htmltidy to turn your HTML into XHTML. Then just use XPath.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

  • Comment on Re: Looking for a XPATH-like tool for HTML documents

Replies are listed 'Best First'.
Re^2: Looking for a XPATH-like tool for HTML documents
by neniro (Priest) on Aug 22, 2005 at 12:48 UTC
    That was the thing i missed to say in my node :)
Re^2: Looking for a XPATH-like tool for HTML documents
by xern (Beadle) on Aug 24, 2005 at 13:31 UTC

    I just scribbled up a command piping tidy and xpath into 'hpath'.

    #!/bin/sh # hpath foo.html /path tidy -asxhtml -numeric $1 2>/dev/null | xpath $2

    Hope it helps. Thanks