2 Replies Latest reply on Jan 16, 2010 9:34 AM by baianomauricioct

    Getting the lower value from a several xml nodes

    baianomauricioct

      Hi all, I know I've asked your help before with this very same issue. I couldn't figure out how to implement this. Please help me!!!

       

      I have 30 values coming from an xml file, and I need to programatically find out which of them is the lowest, then I need also to find out exactly where it is located, so I can get the value that is located next. What I mean is:

       

      Let's suppose that on the following xml, Cat2 is the lowest value, I need not only to print Cat2, but also Dog1. So, I will need to find out how to get Dog1 knowing that Cat2 is the lowest value.

       

      <xml>

         <1>

            <a>

                     Dog

            </a>              

            <b>

                     Cat

            </b>

            <c>

                     Cow

            </c>

            <d>

                     Bull

            </d>

         </1>

         </1>

         <2>


            <a>

                     Dog1

            </a>              

            <b>

                     Cat2

            </b>

            <c>

                     Cow3

            </c>

            <d>

                     Bull4

            </d>

         </2>

         <3>


            <a>

                     Dog4

            </a>              

            <b>

                     Cat5

            </b>

            <c>

                     Cow6

            </c>

            <d>

                     Bull4

            </d>

         </3>

         <4>


            <a>

                     Dog4

            </a>              

            <b>

                     Cat5

            </b>

            <c>

                     Cow6

            </c>

            <d>

                     Bull6

            </d>

         </4>

      </xml>

       

       

      Kglad was kind enough and had helped me before to create both the functions, the following actionscript you will see the functions minF and stripF, but I am having a hard time implementing it.

       

      Thank you all for the great help!

       

       

      Actionscript:

       

       

      Lastly, one more thing is not behaving as it should. You will see in the attach screenshot, that the field that corresponds to 24 Dec. is empty, but I do have data in the xml file for all the nodes. Anyone could please shed me a light on that?

       

       

      Thanks. You guys rock!