1 Reply Latest reply on Oct 24, 2008 3:46 PM by ntsiii

    getting only one value in XML when multple values exist

    MixMastaJames Level 1
      I was wondering if there was a "simple" way to return only a first found value in an XML file (using AutoComplete for data binding)

      For example.. if the following XML exists:

      <song>
      <title>Blackbird</title>
      <artist>The Beatles</artist>
      </song>
      <song>
      <title>Everybody's Got Something to Hide Except Me and My Monkey</title>
      <artist>The Beatles</artist>
      </song>
      <song>
      <title>Revolution 1</title>
      <artist>The Beatles</artist>
      </song>
      <song>
      <title>Good Times Bad Times</title>
      <artist>Led Zeppelin</artist>
      </song>
      <song>
      <title>You Shook Me</title>
      <artist>Led Zeppelin</artist>
      </song>
      <song>
      <title>Your Time Is Gonna Come</title>
      <artist>Led Zeppelin</artist>
      </song>

      With an AutoCompleteManager from yahoo, it returns Led Zeppelin 3 times and The Beatles 3 times if you start typing in things that match.. is there an "easy" way to tell it to only use ONE of the artists if found?

      I know I could loop through the XML and create an XML list and blah blah blah.. but not sure how time consuming 12,000 records will be :) so trying to find a simple way to do it..

      thanks!