Forum Moderators: coopster
I have to add articles to my website and I would like to store them in a flexible, efficient manner that allows me to dixplay them in part or in whole in various areas of the site.
So, here's my questions:-
1: Is it possible to get MySQL to return XML from a query?
1a: Is it my best option to store my data as XML or as plain data and extract as XML?
1b: What is the best way to do this?
2: Can a page contain just bits of XSLT, rather than be an XSLT page?
3: Do I query my database and incorporate the XML results into a page the same way I would usually echo a variable, or do I somehow query to create a separate XML document, and state it as the source for an XSLT page?
3a: What's the best method to do this?
4: Is there a good method for breaking down text documents into XML without manually asdding a tag to every title, paragraph etc etc.
5: Is there any logic in storing articles as XML files instead of in the database?
1a: Is it my best option to store my data as XML or as plain data and extract as XML?
1b: What is the best way to do this?
****************************************
it's not that difficult...you build the xml file on the fly with php. You simply echo or print in the content of the query into the xml file and when it is read, it's xml...no need to make the data different in the db.
****************************************
2: Can a page contain just bits of XSLT, rather than be an XSLT page?
****************************************
I don't believe so, usually an XSLT is like a template file, you use all of it or none of it...try googling exit xslt for html or something similar.
****************************************
3: Do I query my database and incorporate the XML results into a page the same way I would usually echo a variable, or do I somehow query to create a separate XML document, and state it as the source for an XSLT page?
3a: What's the best method to do this?
****************************************
Think of XSLT like CSS, you tell it where to get stylized and it will do it. echo in the contents and make sure in the header you tell where you want the style to come from.
****************************************
4: Is there a good method for breaking down text documents into XML without manually asdding a tag to every title, paragraph etc etc.
****************************************
Throw it in a db with headers of the information and then echo them into a dynamically generated xml file.
****************************************
5: Is there any logic in storing articles as XML files instead of in the database?
****************************************
There isn't a need to...XML is a way for companies to or businesses or web servers to "Speak" the same language. You can have your data however you like, just when you call it from your database it's in that format, XML...
****************************************
Hope this helps!