3 Replies Latest reply on Sep 12, 2006 8:53 AM by Newsgroup_User

    xpath sorting or filtering help!!

    Rain1522
      I want to know if it is possible to filter using xpath with the sample xml that i have attached, or do i have to change it and add addributes to it. Right now i am using " XPathAPI.selectNodeList(this.firstChild, "/document/City"); " but i want to filter it by the city name in the xml . Thanks in advance

      Xml sample below:

        • 1. Re: xpath sorting or filtering help!!
          Level 7
          So you want to select only the nodes with <City> == "CityName"?

          Just verifying before I explain how to do it.


          • 2. Re: xpath sorting or filtering help!!
            Level 7
            One other question - is this XML setup properly?

            Are all of these items (Access, Prior Authorization, Formulary Type, Tier)
            all dependent on each other or are they elements dependent of each other and
            relate directly to the Plan? The way you have it now describes that Access
            is a property of PriorAuthorization, which is a property of FormularyType,
            which is a property of Tier

            OR should it be...

            City
            - Plan
            -Tier
            -FormularyType
            -PriorAuthorization
            -Access

            Where Access, PriorAuthorization, FormularyType, and Tier are all properties
            of the Plan?

            You could also make it more concise by doing this:
            <city name="" plan="" access="" priorAuthorization="" formularyType=""
            tier="" />

            Just want to make sure - the formatting looked a little odd to me.



            • 3. Re: xpath sorting or filtering help!!
              Level 7
              I SAID:

              > Are all of these items (Access, Prior Authorization, Formulary Type, Tier)
              > all dependent on each other or are they elements DEPENDENT of each other
              > and relate directly to the Plan?

              I SHOULD HAVE SAID:

              > Are all of these items (Access, Prior Authorization, Formulary Type, Tier)
              > all dependent on each other or are they elements INDEPENDENT of each other
              > and relate directly to the Plan?