1 Reply Latest reply on Apr 10, 2008 10:47 PM by Sreenivas R

    Navigating an XML variable

    Brent Lamborn Level 2
      I've got an XML object in my app named labelFeed. It looks like this in my debugger:


      labelFeed = <options>
      <item name="item description" price="$10.00" image=" http://dev.xxxxxxxx.com/xxxxxxxx/images/placeholder.png"/>


      I've tried all of the following to get the price out of the first item node (copied from debug window) :

      labelFeed.item[0] = <errors during evaluation>
      No such variable: item
      labelFeed.options.item[0] = <errors during evaluation>
      No such variable: options
      labelFeed.child("item").price = <errors during evaluation>
      Expression could not be fully resolved
      labelFeed.item.@price = <errors during evaluation>
      Syntax error in expression.
      labelFeed.item.price = <errors during evaluation>
      No such variable: item
      labelFeed.item.attribute("price") = <errors during evaluation>
      labelFeed.item[0] = <errors during evaluation>
      No such variable: item
      labelFeed.attribute("price") = <errors during evaluation>
      Expression could not be fully resolved
      labelFeed.text().item.price = <errors during evaluation>
      No such variable: text
      trace(labelFeed.@*.toXMLString()); \r\n = <errors during evaluation>
      Expression contains an operator that is not known: Operator.UNKNOWN
      labelFeed.children() = <errors during evaluation>
      No such variable: children
      trace(labelFeed.children()[0].toXMLString()); = <errors during evaluation>
      Expression contains an operator that is not known: Operator.UNKNOWN


      How can I get the price attribute in the item node from my XML ?