![]() |
| Sponsored Links (We share ad revenue): |
|
|
Re: XML and PHP |
|
Skilled Talker
Posts: 97
Name: Chris Duerr
|
Typically, I would just read a record in from the database, perhaps store it in an object, and call an object function to spit out the XML code manually to suit your DTD spec -- either to display or a file.
Parsing XML is usually where people will need help with pre-built functions/classes. http://www.php.net/xml for that.
__________________
Chris Duerr AddonChat Java Chat Software http://www.addonchat.com/ - Affiliate Program |
|
|
|
|
|
Re: XML and PHP |
|
Weightlifting CS Student
Posts: 480
Name: Nick Ohrn
|
If you're using PHP5, I would investigate using the DomDocument class for building up your XML document. Also, are you only going to be using the data in the database for this purpose? If so, why not just store the data as XML in the first place.
__________________
NickOhrn.com - My personal haven of insight to offer the world. Plugin-Developer.com - Custom plugin development to fit your needs. Plugins available for WordPress and Drupal, among others. |
|
|
|
|
|
Re: XML and PHP |
|
Fetchez la vache!
Latest Blog Post:
Pretty pretty please…. Posts: 1,689
Name: Thierry
Location: In the void
|
I personaly like the phpWriter extension.
I've used it in my framework quixml [ http://www.quixml.org ] I end up the XML generation with something like this: PHP Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML>
<?xml-stylesheet href="/xsl/org.quixml.index" type="text/xsl"?>
<ROOT>
<DATAS demo="true">
<feeling>happy</feeling>
<subcat>
<test>data comes here</data>
</subcat>
</DATAS>
</ROOT>
<!-- Generation time: 0.00999999046326 -->
__________________
Listen to the ducky: "This is awesome!!!" Last edited by tripy : 05-08-2008 at 03:26 AM. |
|
|
|
| Sponsored Links (We share ad revenue): |
| Thread Tools | |
|
|
| Webmaster Resources Marketplace: |
| Software Development Company | Webhosting.UK.com |
| Web Templates | Text Link Brokers | Stock Photos |