Tolong pilih kategori sesuai, jenis posting (diskusi atau bukan) dan sertakan tag/topik yang sesuai seperti komputer, java, php, mysql, dll. Promosi atau posting tidak pada tempatnya akan kami hapus!
- Bagi Anda yang ingin mendaftar, baca link berikut:
http://diskusiweb.com/discussion/50491/how-to-registrasi-diskusiweb-com-baca-ini-terlebih-dahulu
- Cara menyisipkan kode program supaya tampil rapi dan terformat dengan baik di diskusiweb.com: http://www.diskusiweb.com/discussion/50415/cara-menyisipkan-kode-program-di-diskusiweb-com
- Cara posting gambar/image di post Anda: http://www.diskusiweb.com/discussion/47345/cara-menyisipkan-menyertakan-image-pada-posting/p1

New bie di xwl gimana cara parsing XML di PHP

edited November -1 in Diskusi Pemrograman & IT
saya cuma file xml contohnya currency.xml

datanya kaya gini nih :


<?xml version="1.0" encoding="ISO-8859-1" ?>
- <currency xmlns:dt="urn:schemas-microsoft-com:datatypes">
- <rec>
<lastdate dt:dt="number">20080505</lastdate>
<lasttime dt:dt="number">91103</lasttime>
<overallcode dt:dt="string">USDAUD</overallcode>
<currencyname dt:dt="string">United States Dollar</currencyname>
<againstname dt:dt="string">Australian Dollar</againstname>
<trade dt:dt="number">1.0664</trade>
<bid dt:dt="number">1.0661</bid>
<offer dt:dt="number">1.0668</offer>
</rec>
- <rec>
<lastdate dt:dt="number">20080505</lastdate>
<lasttime dt:dt="number">91111</lasttime>
<overallcode dt:dt="string">USDEUR</overallcode>
<currencyname dt:dt="string">United States Dollar</currencyname>
<againstname dt:dt="string">Euro</againstname>
<trade dt:dt="number">0.6473</trade>
<bid dt:dt="number">0.6472</bid>
<offer dt:dt="number">0.6474</offer>
</rec>
- <rec>
<lastdate dt:dt="number">20080505</lastdate>
<lasttime dt:dt="number">90901</lasttime>
<overallcode dt:dt="string">USDIDR</overallcode>
<currencyname dt:dt="string">United States Dollar</currencyname>
<againstname dt:dt="string">Indonesian Rupiah</againstname>
<trade dt:dt="number">9233.5</trade>
<bid dt:dt="number">9231</bid>
<offer dt:dt="number">9236</offer>
</rec>
- <rec>
<lastdate dt:dt="number">20080505</lastdate>
<lasttime dt:dt="number">91130</lasttime>
<overallcode dt:dt="string">USDJPY</overallcode>
<currencyname dt:dt="string">United States Dollar</currencyname>
<againstname dt:dt="string">Japanese Yen</againstname>
<trade dt:dt="number">105.33</trade>
<bid dt:dt="number">105.3</bid>
<offer dt:dt="number">105.36</offer>
</rec>
- <rec>
<lastdate dt:dt="number">20080505</lastdate>
<lasttime dt:dt="number">91148</lasttime>
<overallcode dt:dt="string">USDSGD</overallcode>
<currencyname dt:dt="string">United States Dollar</currencyname>
<againstname dt:dt="string">Singapore Dollar</againstname>
<trade dt:dt="number">1.3621</trade>
<bid dt:dt="number">1.3616</bid>
<offer dt:dt="number">1.3626</offer>
</rec>
</currency>




saya coba parsing pake kxparse cuma yang nongol cuma record pertama doang kira2 ada yang bisa bantuin gak parsing yang gampang

Thanks
Tagged:

Comments

Sign In or Register to comment.