473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Jan 26 '08 #1
3 1308
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

Jan 26 '08 #2
"Iván Sánchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:fn**********@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
Jan 27 '08 #3
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_*************************@hotmail.com
Jabber:iv*********@jabber.org ; iv*********@kdetalk.net
Jan 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Timothy Larson | last post by:
A couple years ago it seemed like XHTML was the direction of most web markup, a foregone conclusion. Now I return to the scene and I see many here recommending that authors stick to HTML, albeit...
2
by: Jason | last post by:
I have a web form that will accept XML as input whose contents need to be namespaced, and inserted into an XML document with a different namespace. I need to take this: Lorem ipsum dolor...
6
by: jackwootton | last post by:
Hello everyone, I understand that XML can be parsed using JavaScript using the XML Document object. However, it is possible to parse XHTML using JavaScript? I currently listen for DOMMutation...
0
by: Mitchel Haas | last post by:
I've noticed several inquiries in the past for libraries/toolkits to generate or parse xhtml. Although there are already a few libraries available for this purpose, I'd like to announce a new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.