다음과 같은 구조를 가진 XElement
개체가 있습니다. DataPointValue
속성이 다른 TestResults
루트 노드에서 모든 자식 노드를 선택하고 배열/목록에 XElement
으로 저장하려면 어떻게해야합니까? 나는 각각의 자식을 또 하나의 XElement
으로 저장할 수 있기를 원한다. 그래서 나는 그것들을 통해 반복하여 각각 SeriesAsOfDate
과 데이터 노드를 가져올 수있다.자식 노드를 가져 와서 부모 노드에서 그룹화하는 방법
<TestResults RSSD="123456">
<CalcConceptId Id="110" DataPointValue="10">
<SeriesAsOfDate Value="2013-07-10T00:00:00">
<Data AsOfDate="7/10/2013" ExpectedValue="1" />
<Data AsOfDate="7/3/2013" ExpectedValue="14" />
<Data AsOfDate="6/26/2013" ExpectedValue="55" />
</SeriesAsOfDate>
</CalcConceptId>
<CalcConceptId Id="110" DataPointValue="20">
<SeriesAsOfDate Value="2013-07-10T00:00:00">
<Data AsOfDate="7/10/2013" ExpectedValue="4" />
<Data AsOfDate="7/3/2013" ExpectedValue="34" />
<Data AsOfDate="6/26/2013" ExpectedValue="1" />
</SeriesAsOfDate>
</CalcConceptId>
</TestResults>