My XML:
< measValue dn="Cabinet=0, Shelf=0, Card=2, Host=0">
< r p="1">1.42</r>
< r p="2">2.28</r>
< /measValue>
I want to match getAttribute("dn") with different patterns like
1> Host=0
# this is very easy
my solution:
if (getAttribute("dn")=~ /Host=0/)
2> Host=0 && Card=2
I can do it but I need to match it twice like
if (getAttribute("dn")=~ /Host=0/) && (getAttribute("dn")=~ /Card=2/)
Is there any better way to accomplice this match this second pattern? using LibXML