reset and begin
7/20/2010

ghi dữ liệu với xml

list.xml

<?xml version="1.0" encoding="utf-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
<trackList>
<track>
<title>Thụy Anh</title>
<creator>Một Phút Yêu (Demo)</creator>
<location>http://musicbox.vn/khonhac/1phutyeu(demo).mp3</location>
<image>mp3/kz.gif</image>
<info>http://Docnhat.tk</info>

</track>

<track><title>day la title</title></track>
<track><title>day la title</title></track>
</trackList>
</playlist>
index.php

$dom = new DOMDocument();
$dom->load('list.xml');

$tracklist=$dom->getElementsByTagName('trackList')->item(0);
$track=$dom->createElement('track');

$title=$dom->createElement('title','day la title');
$track->appendChild($title);

$tracklist->appendChild($track);
$dom->save("list.xml");

Bloger Comments
G+ Comments
Comments FaceBook

No comments:

List

Profiles Information


About me : Nothing is 1 vài thứ - 1985

Places I've Lived : I Hà Nội

Home Page : http://www.shimivn.blogspot.com/

Think : 1:1000000000

Languages spoken : Vietnamese,English.

Mobile : sony C2305

dell : i3-Ram 3GB- HDD 250GB .