How to use IN(,,,) with xmlreader to get specific nodes.
private static IEnumerable<DayNode> ReadDayNodes(string filePath)
{
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read))
using (XmlReader xrdr = new XmlTextReader(fs))
while (xrdr.Read())
if (xrdr.NodeType == XmlNodeType.Element && xrdr.LocalName == "day")
yield return new DayNode(xrdr.GetAttribute("name"), xrdr.GetAttribute("short"), xrdr.GetAttribute("day"));
}
If i have list of string.
like this :
List<string> names = new new List<string>();
and i wanna to get only the nodes which name in the previous list .How to that?
Do you mean, where the element’s local-name isn’t necessary “day”, but rather is in the list?
Edit following on comments: