2 Replies Latest reply on Mar 27, 2009 7:49 PM by alice_data

    XML Node Extraction Help

    alice_data Level 1
      Hi, Guys:

      I have a snippet of code here as attached. The problem is that it appears that even though my nameHolder variable returns me with the right values, I still get all the nodes instead of one that has @name parameter set up.

      Could anyone please give me some pointers on what I have done wrong here?

      Thanks for your help.

        • 1. Re: XML Node Extraction Help
          _Natasha_ Level 4
          It seems that candition in
          resultB= searchResult..book.(nameHolder);
          ignored if nameHolder is a variable.

          If you write
          esultB= searchResult..book.(@name == name_var);
          it works fine. But you should defenetly know how many conditions do you have.

          So you can filter your data in the loop and save it in another XML to return.
          • 2. XML Node Extraction Help
            alice_data Level 1
            How many conditions there are depends on the users selections. If there user selects more than one, it is joined with an OR clause and is supposed to filter out the options. I tried filtering it out by using a Boolean clause as shown in the code attached, but it appears that it is still ignoring it and gives me the entire output no matter what.

            I went back to dig through the code, and looks like what is attached would be the closest to what I want. The problem, how can you combine the two sets if they are both selected? Right now I get two separate ones instead of an entire one.