Parsing XHTML fragments
I need to parse fragments (no header or footer) of XHTML using SAX.
I want to use xml_parser_create() and friends. Is this possible or do I have
to add header and footer elements ?
Or is there a better way than xml_parser_create() ?
Aaron
Re: Parsing XHTML fragments
Aaron Gray wrote:
> Or is there a better way than xml_parser_create() ?
Try out the "simplexml" library. IMHO it's well suited to reading and
parsing XML.
(Note to flamers: I'm not saying "it's better" - I'm saying "try it")
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Proudly running Debian Linux with 2.6.22-3-amd64 kernel, KDE 3.5.8, and PHP
5.2.4-2+b1 generating this signature.
Uptime: 22:16:21 up 65 days, 8:31, 4 users, load average: 0.56, 0.75,
0.74
Re: Parsing XHTML fragments
"Iván Sánchez Ortega" <ivansanchez-alg [at] rroba-escomposlinux.-.punto.-.org>
wrote in message news:fng821$ht0$1 [at] hercules.cohp1...
> Aaron Gray wrote:
>
>> Or is there a better way than xml_parser_create() ?
>
> Try out the "simplexml" library. IMHO it's well suited to reading and
> parsing XML.
Does that come with PHP or is it an addon. I really just want to use what is
standard and not require any extra addon libraries.
Aaron
Re: Parsing XHTML fragments
Aaron Gray wrote:
>> Try out the "simplexml" library. IMHO it's well suited to reading and
>> parsing XML.
>
> Does that come with PHP or is it an addon. I really just want to use what
> is standard and not require any extra addon libraries.
AFAIK, it comes with the standard installation of PHP5.
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
MSN:i_eat_s_p_a_m_for_breakfast [at] hotmail.com
Jabber:ivansanchez [at] jabber.org ; ivansanchez [at] kdetalk.net