newbie learning jquery

newbie learning jquery

I'm learning jQuery with XML. I'm familiar with other query languages such as XPath. I'm having a little bit of difficulty wrapping my brain around how jQuery works but I think I can make the leap if I see a solution to a problem I know how to solve with other methods. I'd appreciate your help with an example. Given the following XML, please share a jQuery solution to finding the value of attribute B in elements named bar where attribute A has the value 30:

<foo>
      <bars>
            <bar A="99" B="chicken" />
            <bar A="30" B="cow" />
            <bar A="2" B="platypus" />
      </bars>
</foo>

I'd really appreciate multiple solutions so I can compare and learn. Thanks much for your help.