I need to get the element value <mathcolor>for the element <colorvalue>has a value of 2. Please correct the Xpath expression below:
Xpath expression:
/colors/child::color/child::mathcolor[colorvalue='2']
XML example:
<?xml version="1.0"?>
<colors>
<color>
<mathcolor>#007dc5</mathcolor>
<textcolor>C=100 M=40 Y=0 K=0</textcolor>
<colorvalue>2</colorvalue>
</color>
<color>
<mathcolor>#ed1b34</mathcolor>
<textcolor>C=0 M=100 Y=85 K=0</textcolor>
<colorvalue>3</colorvalue>
</color>
</colors>
source
share