xml - Using XmlTextWriter with iTunes podcast -
i have following code generating xml podcast file itunes podcast:
dim writer new xmltextwriter("c:\jdir\test.xml", system.text.encoding.utf8) writer.writestartdocument(true) writer.formatting = formatting.indented writer.indentation = 4 writer.writestartelement("channel") writer.writestartelement("title") writer.writestring("my podcast") writer.writeendelement() ....etc etc..
but when came part:
<itunes:image href="http://www.mywebsitehere.com/student.jpg" /> <itunes:category text="education"> <itunes:category text="education technology"/> </itunes:category> <itunes:category text="higher education"/>
i unsure how add href= element , text=?
any great!
you can add href= , text = using writeattributestring
..
try below code.. may you...
writer.writestartelement("itunes:image") writer.writeattributestring("href", "http://www.mywebsitehere.com/student.jpg") writer.writeendelement() writer.writestartelement("itunes:category") writer.writeattributestring("text", "education") writer.writestartelement("itunes:category", nothing) writer.writeattributestring("text", "education technology") writer.writeendelement() writer.writeendelement() writer.writestartelement("itunes:category") writer.writeattributestring("text", "education technology") writer.writeendelement()
Comments
Post a Comment