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

How To Use A DataSource

Expand Messages
  • nicolas_kreyer
    Hello. I have an XML file and I want to use some content to create objects with js. I used the DataSource to extract the content, and I managed to display it
    Message 1 of 6 , Jun 29, 2007
    • 0 Attachment
      Hello. I have an XML file and I want to use some content to create
      objects with js.

      I used the DataSource to extract the content, and I managed to display
      it with a Datatable. But I want to use the content, not to display it.

      Is it possible?

      Thanks.

      Nico
    • nicolas_kreyer
      ... Up. I have a XML file looking like : ... ... ... ... ...
      Message 2 of 6 , Jul 2 12:40 AM
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "nicolas_kreyer"
        <nicolas_kreyer@...> wrote:
        >
        > Hello. I have an XML file and I want to use some content to create
        > objects with js.
        >
        > I used the DataSource to extract the content, and I managed to display
        > it with a Datatable. But I want to use the content, not to display it.
        >
        > Is it possible?
        >
        > Thanks.
        >
        > Nico
        >
        Up. I have a XML file looking like :

        <legend>
        <item>
        <name>...</name>
        <style>...</style>
        </item>
        ...
        <item>
        <name>...</name>
        <style>...</style>
        </item>
        </legend>

        and I would like to build a Legend instance with these datas. I have
        methods to create legendItem instances, with "name" and "style"
        parameters. How can I pass the datas from the XML file into parameters
        fields?
      • daniel
        I m not sure, but does this help? http://developer.yahoo.com/python/python-xml.html
        Message 3 of 6 , Jul 2 12:23 PM
        • 0 Attachment
          I'm not sure, but does this help?
          http://developer.yahoo.com/python/python-xml.html



          --- In ydn-javascript@yahoogroups.com, "nicolas_kreyer"
          <nicolas_kreyer@...> wrote:
          >
          > --- In ydn-javascript@yahoogroups.com, "nicolas_kreyer"
          > <nicolas_kreyer@> wrote:
          > >
          > > Hello. I have an XML file and I want to use some content to create
          > > objects with js.
          > >
          > > I used the DataSource to extract the content, and I managed to display
          > > it with a Datatable. But I want to use the content, not to display it.
          > >
          > > Is it possible?
          > >
          > > Thanks.
          > >
          > > Nico
          > >
          > Up. I have a XML file looking like :
          >
          > <legend>
          > <item>
          > <name>...</name>
          > <style>...</style>
          > </item>
          > ...
          > <item>
          > <name>...</name>
          > <style>...</style>
          > </item>
          > </legend>
          >
          > and I would like to build a Legend instance with these datas. I have
          > methods to create legendItem instances, with "name" and "style"
          > parameters. How can I pass the datas from the XML file into parameters
          > fields?
          >
        • daniel
          This was very helpful for me: http://xmljs.sourceforge.net/
          Message 4 of 6 , Jul 2 1:03 PM
          • 0 Attachment
            This was very helpful for me:
            http://xmljs.sourceforge.net/


            --- In ydn-javascript@yahoogroups.com, "nicolas_kreyer"
            <nicolas_kreyer@...> wrote:
            >
            > --- In ydn-javascript@yahoogroups.com, "nicolas_kreyer"
            > <nicolas_kreyer@> wrote:
            > >
            > > Hello. I have an XML file and I want to use some content to create
            > > objects with js.
            > >
            > > I used the DataSource to extract the content, and I managed to display
            > > it with a Datatable. But I want to use the content, not to display it.
            > >
            > > Is it possible?
            > >
            > > Thanks.
            > >
            > > Nico
            > >
            > Up. I have a XML file looking like :
            >
            > <legend>
            > <item>
            > <name>...</name>
            > <style>...</style>
            > </item>
            > ...
            > <item>
            > <name>...</name>
            > <style>...</style>
            > </item>
            > </legend>
            >
            > and I would like to build a Legend instance with these datas. I have
            > methods to create legendItem instances, with "name" and "style"
            > parameters. How can I pass the datas from the XML file into parameters
            > fields?
            >
          • nicolas_kreyer
            Yeah, these two links could bring a solution to my question, I guess, but I was asked to do it using YUI. That was the puropose of my question. Is it possible
            Message 5 of 6 , Jul 3 12:56 AM
            • 0 Attachment
              Yeah, these two links could bring a solution to my question, I guess,
              but I was asked to do it using YUI.

              That was the puropose of my question. Is it possible to parse and use
              XML through YUI dataSource or dataTable or another class?

              Because it seems to me you can only display a XML file.
            • Gareth Shapiro
              Hey Nicolas, I too was stumped with DataSource until a helpful chap called Jerome supplied an example that I was able to use. I am using the DataSource to get
              Message 6 of 6 , Jul 3 3:13 AM
              • 0 Attachment
                Hey Nicolas,

                I too was stumped with DataSource until a helpful chap called Jerome
                supplied an example that I was able to use. I am using the DataSource
                to get JSON data but I am sure XML is also possible. Check out :
                http://tech.groups.yahoo.com/group/ydn-javascript/message/14270

                Gareth
              Your message has been successfully submitted and would be delivered to recipients shortly.