jquery, xml, reading

ITsolutionWizard
ITsolutionWizard used Ask the Experts™
on
I want to do something like in jquery

if the state = "CA" and bondname = "Contractor1" then
      show me the status element value e.g. "Online"

how can I do that in Jquery?

<Surety>
  <SuretyLine>
    <Commercial>
      <Bond>
        <GeneralInformation UI="BondInfo">
          <Name ID="bondName" PrefillValue="Yes">Contractor 1</Name>
          <State ID="bondState" PrefillValue="Yes">CA</State>
       </GeneralInformation>
         <Image></Image>
        <Status>Online</Status>
      </Bond>
  <Bond>
        <GeneralInformation UI="BondInfo">
          <Name ID="bondName" PrefillValue="Yes">Contractor 2</Name>
          <State ID="bondState" PrefillValue="Yes">CA</State>
       </GeneralInformation>
         <Image></Image>
        <Status>Online</Status>
      </Bond>
            <Bond>
        <GeneralInformation UI="BondInfo">
          <Name ID="bondName" PrefillValue="Yes">Contractor asdfasd</Name>
          <State ID="bondState" PrefillValue="Yes">FL</State>
       </GeneralInformation>
         <Image></Image>
        <Status>Online</Status>
      </Bond>
</Commercial>
</SuretyLine>
</Surety>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
any helps?

Author

Commented:
any helps?
Multitechnician
Top Expert 2014
Commented:
you already get an answer from me in a previous question.
what did you expect now ?
I would like to suggest you to study my answer, investigate the code to make it your and you will see why this new question is useless IMO
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
This is different from the one you helpef
leakim971Multitechnician
Top Expert 2014

Commented:
my answer to this new one would be the same, for a give value "CA" find an other one in the same node.

Author

Commented:
It is not the same this time I need status
leakim971Multitechnician
Top Expert 2014

Commented:
so if you have 100 fields in a node, and you need to get each value, you gonna post 100 questions?
That's why I suggest you to make the code your own. No matter which field you need to read the value, the logic doesn't change.

Author

Commented:
It is okay. I just wait for other helps
Top Expert 2004

Commented:
Based on the solution you received in https://www.experts-exchange.com/questions/29063891/JAVASCRIPT-XML.html, what work have you done towards adapting that towards this goal?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial