xml what? expat, simplexml, dom, xmlrpc?
03-17-2008, 02:30 AM
|
xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 6
Name: anggoro
|
I am learning xml for curiousity. I think this db format is ready to go wider than as rss-thing. So, I'm trying to make simple cms with xml (not mysql or plain txt db).
I tried simplexml. It's cool and so easy. But, this feature is only available (by default) in php5.
I tried dom, and it's full of codes. I think it run heavier than simplexml.
I look around web and found that there are many cms' use xmlrpc and expat as xml parser.
any one knows?
thanks!!
|
|
|
|
03-17-2008, 02:38 AM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 2,815
Name: Matt
Location: Irvine, CA
|
I'm not sure exactly what you are asking but if you are looking for an xml parser, php has one built in: http://us2.php.net/xml its available in php4 and 5. As far as xml as a database goes, it is still just a flat file, I wouldn't trust it for a large scale project, or if you intend to have a large number of entries.
That being said it may be a good solution to maximize application compatibility where you don't intend to maintain a large database. Maybe someone can correct me if I'm wrong regarding XML based databases vs. mysql, mssql, oracle etc.
Last edited by NullPointer; 03-17-2008 at 02:42 AM..
|
|
|
|
03-17-2008, 02:46 AM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 6
Name: anggoro
|
thanks for your reply. My problem is there are many ways to parse xml file in php. your link point to xml expat (which is one of extension). I want to know what the best extension which available (by default) in php4 and php5.
|
|
|
|
03-17-2008, 04:14 AM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 1,226
Name: Mike
Location: Mataro, Spain
|
Using XML as data storage engine is very, very bad idea. When your data grows over 5 (10, 20, 50) Mb and you get any sufficient amount of requests per second your script performance will reduce in exponential manner. You can use XML to store small amounts of data which you are changing frequently and manually (because main idea of XML is to keep data human readable) but using it instead of usual (relational) database engine will not give you any profit.
|
|
|
|
03-17-2008, 04:15 AM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 1,226
Name: Mike
Location: Mataro, Spain
|
As for me I use PEAR XML::Serializer package to convert XML into data objects and back.
|
|
|
|
03-17-2008, 04:48 AM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 6
Name: anggoro
|
Quote:
Originally Posted by mtishetsky
Using XML as data storage engine is very, very bad idea. When your data grows over 5 (10, 20, 50) Mb and you get any sufficient amount of requests per second your script performance will reduce in exponential manner. You can use XML to store small amounts of data which you are changing frequently and manually (because main idea of XML is to keep data human readable) but using it instead of usual (relational) database engine will not give you any profit.
|
thanks you for your suggestion. I choose xml to this apps because i think it wouldn't be that big. I want to make this for company profile or portfolio website.
btw, what is the benefit of using PEAR than other xml parsers?
|
|
|
|
03-17-2008, 07:10 AM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 1,226
Name: Mike
Location: Mataro, Spain
|
I'm not sure about built in php parsers but in pear unserializer it is just needed to call two functions to convert xml text data into an complex object which I can iterate with foreach() or call something like $object->children['child_name']->items. AFAIR when I tried to play with domxml or something like that I got a lot of problems due to its unobvioucity and bad flexibility.
|
|
|
|
03-17-2008, 11:33 PM
|
Re: xml what? expat, simplexml, dom, xmlrpc?
|
Posts: 6
Name: anggoro
|
thanks. It is like simplexml, you can call xml file by "$root->book->chapter". Unfortunately, simplexml is for php5 (php4 with enable instalation-not by default). But, it lacks in structure recognizing. Ok, I'll try pear, then. thanks again, mtishetsky.
|
|
|
|
|
« Reply to xml what? expat, simplexml, dom, xmlrpc?
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|