The actual XML block should be :
<TAX>
<AMOUNT qualifier=”TAX” type=”T”>
<VALUE>10</VALUE>
<NUMOFDEC>2</NUMOFDEC>
<SIGN>+</SIGN>
<CURRENCY />
<DRCR />
</AMOUNT>
<AMOUNT qualifier=”TAXBASE” type=”T”>
<VALUE>52</VALUE>
<NUMOFDEC>0</NUMOFDEC>
<SIGN>+</SIGN>
<CURRENCY />
<DRCR />
</AMOUNT>
</TAX>
I left out the closing TAX node on the previous one. So there are two nodes under TAX, both are AMOUNT with different qualifiers. I need to get the qualifier =’TAX’ node, and return the Inner Text from VALUE
I have rooted around for a few hours trying to understand how to filter ELEMENTS, etc. and nothing I am doing is working. I have tried several different things that I will not post here, I am just showing you what I have gotten to work somewhat which is:
$TAXAMT = Select-XML -Xml $PY -XPath “//PAYHEADER//TAX//AMOUNT[@qualifier='TAX']”
Thanks