J
Jaime Lucci
Hi everyone!
How can I generate the following xml code from vb2005?
<item>
<title>Sunshine up Ahead</title>
<media:credit role='author'>Peter Jones</media:credit>
<media:content
url="http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
type="audio/mpeg"/>
</item>
I use XmlDocument and XmlNode types variables, but when I create the node
<media:credit> its only creates <credit>, i mean that it only creates the
node with the words after ":". This is my code in VB:
'Create the node
XmlNodo1 = XmlDoc.CreateElement("media:content")
'Add "url" atributte
XmlAtributo = XmlDoc.CreateAttribute("url")
XmlAtributo.Value =
"http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
XmlNodo1.Attributes.Append(XmlAtributo)
'Add "type" atribute
XmlAtributo = XmlDoc.CreateAttribute("type")
XmlAtributo.Value = "audio/mpeg"
XmlNodo1.Attributes.Append(XmlAtributo)
'Add the node to de xml document
XmlNodo.AppendChild(XmlNodo1)
But as I have mention before, it creates
<content
url="http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
type="audio/mpeg"/>
instead of
<media:content
url="http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
type="audio/mpeg"/>
that's what I need.
Any suggestions?
Thanks
Jaime Lucci
(e-mail address removed)
Salta - Argentina
How can I generate the following xml code from vb2005?
<item>
<title>Sunshine up Ahead</title>
<media:credit role='author'>Peter Jones</media:credit>
<media:content
url="http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
type="audio/mpeg"/>
</item>
I use XmlDocument and XmlNode types variables, but when I create the node
<media:credit> its only creates <credit>, i mean that it only creates the
node with the words after ":". This is my code in VB:
'Create the node
XmlNodo1 = XmlDoc.CreateElement("media:content")
'Add "url" atributte
XmlAtributo = XmlDoc.CreateAttribute("url")
XmlAtributo.Value =
"http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
XmlNodo1.Attributes.Append(XmlAtributo)
'Add "type" atribute
XmlAtributo = XmlDoc.CreateAttribute("type")
XmlAtributo.Value = "audio/mpeg"
XmlNodo1.Attributes.Append(XmlAtributo)
'Add the node to de xml document
XmlNodo.AppendChild(XmlNodo1)
But as I have mention before, it creates
<content
url="http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
type="audio/mpeg"/>
instead of
<media:content
url="http://www.jeroenwijering.com/upload/peterjones_sunshine_lofi.mp3"
type="audio/mpeg"/>
that's what I need.
Any suggestions?
Thanks
Jaime Lucci
(e-mail address removed)
Salta - Argentina