Hi,
I'm submitting a command to a ssh session and getting an XML response back which is variable depending on the type of query I'm running. I get the following type of XML returned...
<CLIOutput>
<Results>
<ReturnCode>0</ReturnCode>
<EventCode>23000</EventCode>
<EventSummary>CLI command completed successfully.</EventSummary>
</Results>
<Data>
<Row>
<Client>kcllaptop</Client>
<Domain>/Top/Top</Domain>
</Row>
<Row>
<Client>testclient</Client>
<Domain>/Top/Top</Domain>
</Row>
</Data>
</CLIOutput>
I then parse into an XDocument, and what I want to do is Enumerate through the different <Row> attributes in the <Data> section, given they change. They're always in DATA section, but the attribute names and numbers of them change. I can get the specific one in the example above, but I'm after a more generic method.
I can get to the specifcs by
_xDoc.Elements().<Data>.<Rows>(0).<Client>.ToValue
but the <Client> name changes.
What's the best way to enumerate through the rows returned in the element.
Complete LInq newbie sorry.
Thanks and Cheers, Al