Most of the time this is as simple as
adding /atom.xml to the URL. So for example, instead of typing http://www.myBlog.com, you enter
http://www.myBlog.com/atom.xml.
There are some situations where this will not work. If the blog uses a different format, as mentioned
before, such as RSS 2.0, it will not display. It is also possible that the person setting up the blog placed
the atom.xml file in a location other than the default location, preventing our reader from finding it.
There is one more reason for a blog not to work. For Flex or Flash to accept a feed from a different
site, that site must have a crossdomain.xml file. This is a small file that sits on the server and gives permission
to the Flex or Flash file to access it. This is done for security reasons and most blogs have the
file. It is possible to make this reader more robust and take into account these possibilities, but it
You can find a completed version of this project at this stage in the folder
atomReader1 in the code download for this book at www.friendsofed.com.
19
INTRODUCING FLEX AND FLEX BUILDER 3
would require a good deal of ActionScript. Rather than make this chapter into a coding exercise, we
have decided to keep the technique simple, even if it won??™t always work.
Formatting the feed
You will notice that the text looks a bit messy. That is because we just loaded the XML file as is. This is how
the XML file looks like by default, without any formatting or organization being applied to it.
Pages:
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42