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

Problem with XML input to Datatable

Expand Messages
  • haritha.juturu
    I have an xml file from which i am populating the Data Table ================ XML FILE data.xml START =============================
    Message 1 of 1 , Jul 5, 2007
    • 0 Attachment
      I have an xml file from which i am populating the Data Table

      ================ XML FILE data.xml START =============================
      <?xml version="1.0" encoding="UTF-8"?>
      <notes-component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <notes-component-rows>
      <notes-component-cols>
      <data-val>Haritha</data-val>
      </notes-component-cols>
      <notes-component-cols >
      <data-val>haritha@...</data-val>
      </notes-component-cols>
      <notes-component-cols >
      <data-val>6-6-2007 16:40:30</data-val>
      </notes-component-cols>
      </notes-component-rows>
      <notes-component-rows>
      <notes-component-cols>
      <data-val>Jane</data-val>
      </notes-component-cols>
      <notes-component-cols>
      <data-val>jane@...</data-val>
      </notes-component-cols>
      <notes-component-cols>
      <data-val>7-16-2007 2:40:30</data-val>
      </notes-component-cols>
      </notes-component-rows>
      </notes-component>
      ============================== XML FILE END ==========================

      Below is the code snippet i use to get a DataTable object

      var myDataSource = new YAHOO.util.DataSource("data.xml");
      myDataSource.responseType = YAHOO.util.DataSource.TYPE_XML;
      myDataSource.responseSchema = {
      resultNode: "notes-component-rows.notes-component-cols",
      fields: ["data-val"]
      };

      I dont think i am defining the responseSchema for myDataSource object
      correctly . does anyone have any input on how the above xml can be
      captured in the DataTable.
    Your message has been successfully submitted and would be delivered to recipients shortly.