Avatar of ITsolutionWizard
ITsolutionWizard
Flag 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

jQueryXMLJavaScriptWeb Development

Avatar of undefined
Last Comment
Steve Bink

8/22/2022 - Mon
ITsolutionWizard

ASKER
any helps?
ITsolutionWizard

ASKER
any helps?
ASKER CERTIFIED SOLUTION
leakim971

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ITsolutionWizard

ASKER
This is different from the one you helpef
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
leakim971

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

ASKER
It is not the same this time I need status
leakim971

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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ITsolutionWizard

ASKER
It is okay. I just wait for other helps
Steve Bink

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?