Hi,
I would like to keep few the node's in my xml based on another XML.
string rootXml = @"
John
110
USA
Mary
120
UK ";
// Nodes to keep
string filterXML =
@"
";
Now using XElement and Linq to XML I want to remove all Location nodes from my rootXML. Both rootXML and filterXML will vary by request.
What I have been trying to do is:
var retVars = from c in rootXml.Elements(elementName)
orderby {Dynamic list of columns}
select ({Dynamic List of all filter columns from filterXML);
and at last I want to serialze the retVars.
Please let me know how can I build the list of columns to be selected during runtime.
Thanks
Punu
Replies
Know the answer? Post it — somebody with the same question will find it here.