Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

jquery, xml, reading

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

Avatar of ITsolutionWizard
ITsolutionWizard
Flag of United States of America image

ASKER

any helps?
any helps?
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is different from the one you helpef
my answer to this new one would be the same, for a give value "CA" find an other one in the same node.
It is not the same this time I need status
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.
It is okay. I just wait for other helps
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?