I originally asked this question on RefactorMyCode, but got no responses there...
Basically I'm just try to load an XmlNodeList into an XmlDocument and I was wondering if there's a more efficient method than looping.
Private Function GetPreviousMonthsXml(ByVal months As Integer, ByVal startDate As Date, ByVal xDoc As XmlDocument, ByVa...
Hi all,
I am stuck on a problem. I think I am probably close to the solution but can not seem to get there. I have an XMLDoc that is loaded from a stored Proc, into a dataset and the xml is pulled from it, (don't think I can change any of this part). The XML looks like this:
<data>
<datanode>
<name>11</name>
<group>G1</grou...
Hi there,
I'm trying to remove a specific node from a XmlNodeList named listaWidths. This specific list has 5 items before I use RemoveChild(). But, after the RemoveChild() statement, the list stays only with 1 item.
XmlNodeList listaWidths = xmlDoc.SelectNodes("/MsBuild:Report/MsBuild:Body/MsBuild:ReportItems/MsBuild:Tablix/MsBuild:Ta...
Let's suppose we have an element like this one in the main xml file: <group name="gr1" filename="groups/gr1.xml"/>. The second file gr1.xml contains something like this:
<item name="i1">Item one</item>
<item name="i2">Item two</item>
<item name="i3">Item three</item>
Note that there is no XML declaration in gr1.xml, just plain items w...
Can any one please give me a solution to combine xmlNodelists to a single list .
...
Hello,
I'm using System.Xml to read a xml file in C#.
First I open the file (locally)... and use foreach to get the values, like this:
XmlNodeList titles = xmlDoc.GetElementsByTagName("title");
foreach (XmlNode title in titles)
{
rowNews = new ListViewItem();
rowNews.Text = (title.ChildNodes[0].Value);
listView1.Items.Add(rowNews);
}
...