Re: Good HTML parser needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all.
I have made it working excellent for me now.
The solution is here: http://phparch.cn

On Tue, May 13, 2008 at 1:34 PM, Robert Cummings <robert@xxxxxxxxxxxxx>
wrote:

>
> On Tue, 2008-05-13 at 01:27 -0400, Robert Cummings wrote:
> > On Tue, 2008-05-13 at 12:28 +0800, Shelley wrote:
> > > Maybe I didn't use that tidy correctly.
> > > I don't want html, head, body things. Just parsed string.
> >
> > So strip them...
> >
> > <?php
> >     // ...
> >
> >     tidy_parse_string( $html );
> >     tidy_clean_repair();
> >
> >     $html = tidy_get_output();
> >
> >     $html = preg_replace( '#^.*<body>#Uis', '', $html )
> >     $html = preg_replace( '#</body>#Uis', '', $html )
> >
> >     //...
> > ?>
>
> Whoops... noticed some bugs there :B
>
> <?php
>
>    $html = preg_replace( '#^.*<body>#Uis', '', $html );
>    $html = preg_replace( '#</body>.*$#Uis', '', $html );
>
> ?>
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>


-- 
Regards,
Shelley

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux