1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <script type="text/c#" runat="server">
void Page_Load(object sender, EventArgs e)
{
XmlTextWriter xmlCreator = new XmlTextWriter("c:\\test.xml", System.Text.Encoding.UTF8);
xmlCreator.WriteStartDocument();
xmlCreator.WriteComment("fichier xml descriptif des infos relatives a chaque album");
xmlCreator.WriteStartElement("playlist");
xmlCreator.WriteAttributeString("version", "1");
xmlCreator.WriteAttributeString("xmlns", "http://xspf.org/ns/0/");
xmlCreator.WriteElementString("titre", "Sample XSPF Playlist");
xmlCreator.WriteElementString("info", "http://www.jeroenwijering.com/");
xmlCreator.WriteElementString("annotation", "Sample playlist for the WMV player in XSPF format");
xmlCreator.WriteStartElement("tracklist");
xmlCreator.WriteStartElement("track");
xmlCreator.WriteElementString("title", "LongTail Poster Girl");
xmlCreator.WriteElementString("creator", "Jeroen Wijering");
xmlCreator.WriteElementString("location", "http://www.jeroenwijering.com/upload/silverlight.wmv");
xmlCreator.WriteElementString("info", "http://www.jeroenwijering.com/?item=JW_WMV_Player");
xmlCreator.WriteElementString("image", "postergirl.png");
xmlCreator.WriteEndElement();
xmlCreator.WriteEndElement();
xmlCreator.WriteEndElement();
xmlCreator.Flush();
xmlCreator.Close();
}
</script> |
Partager