php and xml
Moderator: General Moderators
php and xml
I have been considering XML more lately as a solution to several ideas that have come to mind
the open graph stuff used by facebook etc want more tags than ever
so I noticed a function to load an XML to a PHP array and I assume I can then write it back with revisions, this would make do as a database
the hard part is figuring out how to conjure up more meta tags for SEO etc etc etc etc etc
the open graph stuff used by facebook etc want more tags than ever
so I noticed a function to load an XML to a PHP array and I assume I can then write it back with revisions, this would make do as a database
the hard part is figuring out how to conjure up more meta tags for SEO etc etc etc etc etc
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: php and xml
XML is just a container for data. It doesn't actually do anything. You could store your Open Graph data in anything: PHP code, INI file, XML, database, YAML...
Re: php and xml
I was considering using XML as a container for site content, more or less as a database but using XML instead of SQL etc
eventually I was pondering the whole site being carved up into XML and PHP etc
eventually I was pondering the whole site being carved up into XML and PHP etc
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: php and xml
XML is nice and all, useful for static configuration like database credentials and such, but a database is better in general. Searching through XML is horrible compared to what you can do with a database.
But don't let me stop you. Go ahead and try it out for yourself, learn what it can do and what it can't do. I did that myself once a few years ago: the website was designed with XML and rendered into HTML using XSLT (on the client no less), and it was cool. But it isn't the kind of thing I would do "for real".
But don't let me stop you. Go ahead and try it out for yourself, learn what it can do and what it can't do. I did that myself once a few years ago: the website was designed with XML and rendered into HTML using XSLT (on the client no less), and it was cool. But it isn't the kind of thing I would do "for real".
Re: php and xml
Much of the content on many sites including mine is pretty static so XML seems to be as good as anything.
I can use run of the mill forms to insert into the database etc
I was thinking that I have Excel which can save as XML so why not use that as a datasource
then PHP can select what it needs to achieve a given page
I can use run of the mill forms to insert into the database etc
I was thinking that I have Excel which can save as XML so why not use that as a datasource
then PHP can select what it needs to achieve a given page
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: php and xml
Go ahead and try it. You'll learn stuff along the way. I mean, it's not like this is taboo or anything, it's just not necessarily the "best way" (whatever that may be) to do things.
Re: php and xml
I was thinking that XML is best suited to smaller chunks of data, rather than something with 10,000 objects
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: php and xml
At the very least it would take a chunk of memory to load the whole thing into PHP at once. So maybe XML isn't the best choice after all...
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: php and xml
XML files make a terrible database. XML is a reasonable way to store source documents. XML is reasonable for passing small data sets. JSON is probably preferable for most things these days that used to be done with XML.Vegan wrote:so I noticed a function to load an XML to a PHP array and I assume I can then write it back with revisions, this would make do as a database
(#10850)
Re: php and xml
I was looking at managing advertisements which are not that diverse, and they are becoming more keyword based instead of specific items
The idea of XML is simply a container for keywords which I can modify with a spreadsheet when new marketing ideas come along
Other content would be best in a conventional database
The idea of XML is simply a container for keywords which I can modify with a spreadsheet when new marketing ideas come along
Other content would be best in a conventional database
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: php and xml
That will involve searching. Even if just for single keywords, it's searching.
You should use a database.
You should use a database.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: php and xml
If you have it in a spreadsheet, just export as tab delimited and use LOAD DATA to quickly import it into that keywords table.Vegan wrote:The idea of XML is simply a container for keywords which I can modify with a spreadsheet when new marketing ideas come along
Other content would be best in a conventional database
(#10850)
Re: php and xml
seems to be a lot of ideas for data i have not considered, one loaded into PHP arrays its easy for functions to do whatever
i like the idea of using an independent data source
i like the idea of using an independent data source
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP