![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 22
Rep Power: 0
![]() |
modify xml doc using server-side language
I am trying to determine if XML is something I can use in place of a mysql database for a small project. It seems very promising for my purposes, but I can't seem to find one piece of information that is necessary for this to work. Is it possible to use a server-side language, like php, to modify the XML document that resides on the server so that users can make changes to the data stored in the file? I'd be surprised if this isn't possible, but I haven't found anything which gives me an answer to this question. Hopefully someone here can help me out. Thanks.
|
|
|
|
|
|
#2 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 730
Rep Power: 4
![]() |
XML parsing in most server-side languages can be a tad cumbersome/slow. An alternative is to use the traditional PHP + Database option but output XML instead of HTML. That can be used by client applications as well as webbrowsers. Tack on an XSL stylesheet link to the top and it renders like a regular web page.
Example: http://newsrss.bbc.co.uk/rss/newsonl...nology/rss.xml
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jun 2005
Posts: 22
Rep Power: 0
![]() |
I like that idea. Thanks for the suggestion. I will try that. But just out of curiosity, is XML document manipulation, on a file on a server, possible with server-side code? It seems to me that if you can build an xml document then you should be able to modify one.
|
|
|
|
|
|
#4 | |
|
Professional Programmer
|
Quote:
I'd reccomend picking up XML in a nutshell, very very good book for this stuff. |
|
|
|
|
|
|
#5 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 730
Rep Power: 4
![]() |
XML has great application in a) data transmission and b) fairly constant storage.
RSS falls into A because it is used to transfer a set of info from another data source to any of a huge number of clients. Could be firefox, could be an aggregator. GAIM (an instant messenger) stores its preferences in an XML file. This falls into B because the file is only accessed periodically to load it on startup and even less frequently to be rewritten when preferences change. The issue with using XML as a database replacement is server-side overhead and a lot of file locking. Databases are optimized for concurrent access and storage. Each has its use.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#6 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#7 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#8 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#9 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|