Parsing XHTML fragments

Parsing XHTML fragments

am 26.01.2008 02:13:12 von Aaron Gray

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

am 26.01.2008 22:17:52 von ivansanchez-alg

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

am 27.01.2008 16:56:01 von Aaron Gray

"Iván Sánchez Ortega"
wrote in message news:fng821$ht0$1@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

am 27.01.2008 17:04:43 von ivansanchez-alg

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@hotmail.com
Jabber:ivansanchez@jabber.org ; ivansanchez@kdetalk.net