SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: XML creation
-
Apr 10, 2007, 06:27 #1
- Join Date
- Apr 2006
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
XML creation
Hi,
how can i create xml files from mysql database. Currently i'm doing that with simple file handling in php. but i believe there is a better way to do that. May be xml writer, but have never used that.
I am using php 5 and tried dom methods like domxml_new_doc,add_root etc. but those methods are not working may becoz of the version of php.
-
Apr 10, 2007, 07:11 #2
- Join Date
- May 2005
- Location
- London, ON
- Posts
- 360
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I haven't had a chance to try it yet, but maybe the PEAR XML extension would have some useful functions?
http://pear.php.net/packages.php?catpid=22&catname=XML
-
Apr 10, 2007, 22:26 #3
- Join Date
- Apr 2006
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
any other option than PEAR? any class already developed for that?
-
Apr 11, 2007, 00:39 #4
- Join Date
- Oct 2006
- Location
- France, deep rural.
- Posts
- 6,869
- Mentioned
- 17 Post(s)
- Tagged
- 1 Thread(s)
Mysql dump has an xml export option, dont know if thats of interest to you.
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
Heres how to use it:
http://lists.evolt.org/archive/Week-...11/127859.html
-
Apr 11, 2007, 01:15 #5
- Join Date
- Apr 2005
- Location
- Amman -Jordan
- Posts
- 339
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Cups ,
what I c that it dump all table is there anyway to dump a query ??
I use this
http://www.tonymarston.net/php-mysql/dom.html
but I have problem in UTF-8,
I want to use UTF-8 I want to use windows-1256
so I save the file in uft-8 by modify it using iconv , then change it when read the xml..Open Blocked website
Open Blocked Website
Knowledge Is Knowing That A Tomato Is A Fruit,
Wisdom Is Not Putting It In A Fruit Salad.
-
Apr 11, 2007, 02:15 #6
- Join Date
- Oct 2006
- Location
- France, deep rural.
- Posts
- 6,869
- Mentioned
- 17 Post(s)
- Tagged
- 1 Thread(s)
TBH, I dont know - I have never tried it - one of those things that stuck in my head, not sure if I'd ever use it.
Not in a position to try it at the moment.
-
Apr 11, 2007, 22:44 #7
- Join Date
- Apr 2006
- Posts
- 158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thnx Cups, i will try that for sure but for now i have done my job with PHP 5 s DOM object.
A good tutorial for XML creation here.
Bookmarks