2 Replies Latest reply on Oct 25, 2007 8:17 PM by ntsiii

    Reserved Word in Data Provider

      I'm using a httpService to pull back some XML to be used in a dataProvider. However the returned XML (see below) uses '<interface-response>' as it's root node. This causes a problem when defining the dataProvider (see below) as the word 'interface' is reserved. I've no way of changing the XML that is returned, is there way around this problem?

      // DataGrid with dataProvider definition
      <mx:DataGrid id="dg" dataProvider="{resultsService.lastResult.interface-response}">

      // example of returned XML
      <RRPText>Domain available</RRPText>
        • 1. Re: Reserved Word in Data Provider
          mae@ccg Level 1
          Instead of doing .lastResult, you could try using a result handler function which

          1. edits the xml response as a string and changes the <interface-response> elements
          2. takes the edited xml and sets it as the data provider for the grid.

          I'm doing something similar to remove a T from some datetime strings.

          someone else mentioned recently that it's better to get out of the habit of using lastResult...
          • 2. Re: Reserved Word in Data Provider
            ntsiii Level 3
            First, I fully agree with the responder. Do not bind directly to lastResult. there are so many reasons, just don't do it.

            Now to solve the reserved word issue, you can use bracket notation: