I have an xml file that looks like this:
<DocBuild name="ABC">
<BldArea name="Component s" product="ABC" area="C">
<BldItem name="Item1" module="mod1" tier="A" buildtype="auto "/>
<BldItem name="Item2" module="mod2" tier="B" buildtype="auto "/>
</BldArea>
<BldArea name="Core" product="ABC" area="C">
<BldItem name="Item5" module="mod5" tier="A" buildtype="auto "/>
<BldItem name="Item6" module="mod6" tier="B" buildtype="auto "/>
</BldArea>
</DocBuild>
I want to retrieve the name and tier attributes for BldItem elements whose BldArea is "Components ". To get both attributes I can use something like BldItem/@name|BldItem/@tier but how do I specify that I just want those under 'Components'? There will be only one BldArea that contains name="Component s" in the actual XML file.
<DocBuild name="ABC">
<BldArea name="Component s" product="ABC" area="C">
<BldItem name="Item1" module="mod1" tier="A" buildtype="auto "/>
<BldItem name="Item2" module="mod2" tier="B" buildtype="auto "/>
</BldArea>
<BldArea name="Core" product="ABC" area="C">
<BldItem name="Item5" module="mod5" tier="A" buildtype="auto "/>
<BldItem name="Item6" module="mod6" tier="B" buildtype="auto "/>
</BldArea>
</DocBuild>
I want to retrieve the name and tier attributes for BldItem elements whose BldArea is "Components ". To get both attributes I can use something like BldItem/@name|BldItem/@tier but how do I specify that I just want those under 'Components'? There will be only one BldArea that contains name="Component s" in the actual XML file.
Comment