I have a main XML object I'm working with. I cannot figure out how to access parts of it.
<FacetsData>
<Collection name="CDDLALL" type="Group">
<SubCollection name="CDDLALL" type="Row">
<Column name="DPDP_ID">D0230< /Column>
<Column name="Count">9< /Column>
</SubCollection>
<SubCollection name="CDDLALL" type="Row">
<Column name="DPDP_ID">D1110< /Column>
<Column name="Count">9< /Column>
</SubCollection>
</Collection>
</FacetsData>
What I need to do is check every DPDP_ID, and if its value is D0230 then I leave the graph alone, everything else changes the graph to 1.
What I still have:
node = doc.DocumentElement;
nodeList = node.SelectNodes("/FacetsData/Collection/SubCollection");
for (int x = 0; x < nodeList.Count; x++) {
if (nodeList[x].HasChildNodes) {
for (int i = 0; i < nodeList[x].ChildNodes.Count; i++) {
}
}
}
source
share