Loading ...
Sorry, an error occurred while loading the content.

37022Re: [ydn-javascript] How do you use parseXMLData? There are no examples!

Expand Messages
  • Satyam
    Sep 1 7:37 AM
      You should call method sendRequest, that function, depending on the
      responseType you have declared, will call the right parser for you. See:

      http://developer.yahoo.com/yui/datasource/#sendrequest

      Satyam


      Josh Lizarraga wrote:
      > Hi all. I want to use the DataSource utility to parse some very simple
      > XML data. Here's a sample of the data:
      >
      > <results>
      > <result
      > vin = "PCF168FC9LWIZPY"
      > stock = "2DTSZ"
      > year = "2008"
      > />
      > </results>
      >
      > Here's what I've got so far with YUI:
      >
      > var invData = new
      > YAHOO.util.DataSource("http://www.example.com/example_feed.xml");
      > invListing.responseType = YAHOO.util.DataSource.TYPE_XML;
      > invListing.responseSchema = {
      > resultNode: "result",
      > fields: [
      > "vin",
      > "stock",
      > {key: "year", parser: YAHOO.util.DataSource.parseNumber}
      > ]
      > };
      > var invListing = invData.parseXMLData(oRequest,oFullResponse);
      >
      > I want to use the parseXMLData function to parse the data, but I don't
      > understand what oRequest and oFullResponse are. Can someone please
      > explain how these parameters affect my results?
      >
      > Thanks a bunch for any help!
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
    • Show all 4 messages in this topic