469,307 Members | 2,081 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

xmlelement problem

im trying to create a user interface that allows a user to upload there own mixes which are then added to a itunes podcast.

basically, my problem is. when it updates the podcast.xml file, i need it to display author/subtitle etc as itunes:author/itunes:subtitle so on

Expand|Select|Wrap|Line Numbers
  1.  
  2.          XmlElement newElem = doc.CreateElement("item");  
  3.  
  4.         XmlElement titleNode = doc.CreateElement("title");
  5.         XmlElement authorNode = doc.CreateElement("itunes:author");
  6.         XmlElement subtitleNode = doc.CreateElement("itunes:subtitle");
  7.         XmlElement summaryNode = doc.CreateElement("itunes:summary");
  8.  
  9.         // retrieve the text 
  10.         XmlText songTitleText = doc.CreateTextNode(songTitle);
  11.         XmlText authorText = doc.CreateTextNode(artistName);
  12.         XmlText subtitleText = doc.CreateTextNode(itunesSubtitle.Text);
  13.         XmlText summaryText = doc.CreateTextNode(itunesSummary.Text);
  14.  
  15.         titleNode.AppendChild(songTitleText);
  16.         authorNode.AppendChild(authorText);
  17.         subtitleNode.AppendChild(subtitleText);
  18.         summaryNode.AppendChild(summaryText);
  19.  
  20.         newElem.AppendChild(titleNode);
  21.         newElem.AppendChild(authorNode);
  22.         newElem.AppendChild(subtitleNode);
  23.         newElem.AppendChild(summaryNode);
  24.  
using the above code it just prints out author/subtitle etc without the itunes:prefix, is there anyway around this? because it seems a requirement of itunes and i everything ive found on the net about this says i cant do itunes:subtitle using xmlelement, are there anyother ways to do this? i can using xmltextwriter to do it, but im not sure if i can use that to update a file
Feb 14 '07 #1
1 1371
dorinbogdan
839 Expert 512MB
Hi,
Did you succeed to solve the problem ?
If yes, please let me know, in order to close the thread.
Thanks,
Dorin.
Mar 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Timothy V | last post: by
1 post views Thread by nibble | last post: by
4 posts views Thread by Steven.Xu | last post: by
1 post views Thread by andrej | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.