0
I’m trying to create an XML, but I’m not getting it. I want it to have this format:
<item>
<linktext></linktext>
<etc..></etc...>
</item>
I can add one item, but when I go back through the loop, it will come out of the try
and give me the title error. What am I doing wrong? Here’s how I create XML:
XDocument xmlOut = new XDocument();
XElement item = new XElement("item",
new XElement("linktext", processedXML),
new XElement("link", "http://www.boe.es/diario_boe/txt.php?id=" + tmpName[1]),
new XElement("guid", newPdf.ToString()),
new XElement("pubDate", DateTime.Now)
);
xmlOut.Add(item);