473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 1464
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

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

Similar topics

1
by: john diss | last post by:
hello there everyone.. I have created a class called "ProcessLog" inheriting from XmlDocument and two classes ("UploadedItem", "ProcessError") inheriting from XmlElement. I then have two...
2
by: Pluto | last post by:
What is the difference between XmlNode and XmlElement? I'm trying to implement the code at http://www.devx.com/dotnet/Article/11616/0/page/3 in C# and I'm getting an error at this line:...
6
by: Timothy V | last post by:
Hi, I have and XmlElement from within an XmlDocument. I wish to RemoveAll() from within the XmlElement plus itself. For example: <Notes> <Note id="n1"> <Info>A message</Info> </Note> <Note...
1
by: nibble | last post by:
I'm doign the following: XmlElement myElem....; string name = "xmlns:"+"abc"; string value = "http://www.abc.com"; myElem.SetAttribute(name, value); I get an exception saying that name...
4
by: Steven.Xu | last post by:
Hello everyone. I have two instance of xml.xmldocument. One is XA another is XB. XA has a child node XA1. XA1 has many attributes and child nodes. Now I want to copy XA1 to XB with all of it's...
2
by: Compic | last post by:
Hi! I have this class: public class StoredItemElement : XmlElement { protected internal StoredItemElement(string prefix, string localName, string namespaceUri, XmlDocument doc) :...
1
by: andrej | last post by:
hi, ich habe eine anwendung, welche ein xml document erstellt. um festzustellen, ob ein element bereits vorhanden ist, verwende ich die funktion selectsinglenode( ....) diese funktion...
0
by: ryanr | last post by:
I've run into a problem with a recursive algorithm. Basically, it grabs a tree, and creates premutations based off it. For example: Suppose you have you sell shoes in two colors (Black,...
3
by: phil | last post by:
I have written a little application that can grab part of a page from a web site. I then want to take this result and be able to serialize it so that it can be stored as XML. I am storing these...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.