Last post Oct 31, 2019 07:48 AM by Yongqing Yu
Oct 30, 2019 03:35 AM|chandu123|LINK
private XmlDocument FilterRecords(XmlDocument responseXml, int noOfRecords)
XElement envelope = XElement.Parse(responseXml.OuterXml);
XElement envelopeAdd = new XElement("searchResultsList");
foreach (XElement xe in envelope.Elements().Elements())
if (xe.Name.LocalName == "searchResultsList")
int count = 0;
foreach (XElement childXe in xe.Elements())
if (count < noOfRecords)
if (childXe.Name.LocalName == "searchResultsRecord")
Oct 30, 2019 08:09 AM|DA924|LINK
Maybe, a tutorial will help.
Oct 31, 2019 07:48 AM|Yongqing Yu|LINK
According to your description, do you want to query all the elements that meet the conditions through linq, and then add these elements to the envelopeAdd element you created?
If this is the case, please provide the XML file source obtained by responsexml and what content you need to obtain or output in the end?
I hope you can describe your needs in detail and provide detailed information, which will help us solve your problems easily.