[squeak-dev] Reading and using data from external file in Etoys

Ricardo Moran richi.moran at gmail.com
Tue Apr 30 19:59:46 UTC 2013


Hi Luis,

For CSV files you can see that Physical Etoys includes Skeleton with a few
changes that allow a spreadsheet to import/export csv data from external
files. If you want to use that in Etoys you can load this file:
http://source.squeak.org/etoysinbox/Skeleton-Richo.10.mcz and look for the
"data i/o" category on the Skeleton spreadsheet.

For XML, I'm afraid you'll have to get your hands dirty and write some
smalltalk code :)
I don't know your smalltalk knowledge, but here it's a simple example that
might help you get started, let me know if you need more help:

xml := XMLDOMParser parseDocumentFrom: '
<note>
<to>Tove</to>
<from>Jani</from>
 <heading>Reminder</heading>
<body>Don''t forget me this weekend!</body>
</note>' readStream.
xml explore.

Cheers,
Richo


On Mon, Apr 29, 2013 at 5:51 PM, Luis Valente <is.valente at gmail.com> wrote:

> Hi all,
>
> I have a project where I need to read data that is in an external file,
> that file will be in CSV or XML format. I don't know how to do this nor if
> it is possible in Etoys? Who can give ma a hand with a detailed explanation?
> Thank you,
>
>
> All the best,
> Luís Valente
> www.valente.org.pt
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130430/07e65c8b/attachment.htm


More information about the Squeak-dev mailing list