Prev | Current Page 29 | Next

LordAlex Leon, Greg Goralski

"Foundation Flex for Designers"

First we have the HTTPService identified and
named with the id, feed. Notice that this is the name of the feed that we have been using with the other
components that work with this feed. For example, the TextInput has {feed.lastResult} and our button
has feed.send(). The next piece of code, url ="{urlFeed.text}", tells the HTTPService to look into
our inputText component (which we called urlFeed) for the location of the feed. The final piece of code,
resultFormat="e4x", defines the structure that the information gets pulled into. This is more of a developer
topic, but ECMAScript for XML (E4X) can also be very useful for designers as it is a new way to bring
in XML data in a more intuitive way. The result ="onResult(event)" defines when the feed is called.
23. Add this line of code now.
24. Let??™s have a look at what we have created so far. Select Run ?¤ Run atomReader, as shown in
Figure 1-23.
Figure 1-23. Choose Run atomReader from the
Run menu.
Traditionally, bringing in XML data has involved a complex series of loops that organize
the data. With the E4X method, you can call on a piece of information using the
name and location it has within the XML file. For example, if you want to call on the
title of the third post in your file, you can find it at xmlData[3].title. This is a good
deal easier than past methods.
18
CHAPTER 1
The current project output will look like Figure 1-24.
Figure 1-24. Atom Reader with unparsed text
Sources of feeds and limitations
Since this Atom Reader is looking directly at the XML file that creates this particular blog, to open
a different blog you will need to point directly to its XML file.


Pages:
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
botox Kraków wyświetlacz xperia Wczasy nad morzem baseny ogrodowe tłumacz niemieckiego