I have an XML like below :-
<SourceXML>
<Issue ID="123">
<Fields>
<Number>5</Number>
</Fields>
</Issue>
<Issue ID="125">
<Fields>
<Number>8</Number>
</Fields>
</Issue>
<Issue ID="127">
<Fields>
<Number>11</Number>
</Fields>
</Issue>
</SourceXML>
I have to get all the Issue nodes which have number as 11 or 8(where clause filter)
I tried the below but Input will be comma seperated numbers for example 8,11
var result= from c in XElement.Load("path").Elements("Issue")
where c.Element("Fields").Element("Number").Value == Input
select c;
Basically i want the below
<Issue ID="125">
<Fields>
<Number>8</Number>
</Fields>
</Issue>
<Issue ID="127">
<Fields>
<Number>11</Number>
</Fields>
</Issue>
Also i want to write the result into a new xml file.
Please tell me how to go about it, i am dummy in LINQ