Your SlideShare is downloading. ×
0
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Building Flash-based websites using Adobe Flex - Lesson 8/10
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Building Flash-based websites using Adobe Flex - Lesson 8/10

659

Published on

Building Flash-based websites using Flex …

Building Flash-based websites using Flex
Lesson 8 – Remote Data

by Alex goh, associate trainer @ LAB School ( http://lab.edu.sg/ ), Adobe Authorized Training Centre, Singapore

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
659
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Building Flash-based websites using Flex Lesson 8 – Remote Data Alex Goh info@alekkus.com
  • 2. Agenda ● Introduction to XML ● Managing special characters in XML ● XML in Flex ● Extracting XML in Flex ● JSON
  • 3. Introduction to XML ● Extensible Markup Language (XML) is a type of markup language for structuring data hierarchically. ● XML is tag-based, like HTML/MXML, but is designed for representing information rather than controlling visual display. ● Most commonly used to represent data passed from a remote server.
  • 4. Introduction to XML ● ECMAScript for XML (E4X) is the latest standard for reading and writing XML documents. ● One of the most significant changes to ActionScript 3.0 is its native support for E4X. This allowsdevelopers to work seamlessly with XML in their programs without additional parsing.
  • 5. Managing Special Characters in XML ● Certain characters are reserved for an internal use in XML documents. These include the less than (<) and greater than (>) signs, which mark the beginning and end of tag names. ● If we need to include reserved characters in text within an XML node, we can either use: ● a CDATA declaration; or ● escape codes to represent the character. ● A sample list of reserved characters and their corresponding escape codes
  • 6. Managing Special Characters in XML e.g.
  • 7. XML in Flex ● Following are the relevant XML classes: ● XML – an XML object with a valid xml string ● XMLList – an array of XML objects ● XMLListCollection – an “ArrayCollection” of XML objects ● e.g.
  • 8. Extracting Data from XML e.g. Alert.show( sales.item[0].type ); //apples Alert.show( sales.item[2].price ); //5.16
  • 9. JSON ● JavaScript Object Notation (JSON) is another data format that is widely used for representing data from the server. ● Originally made for JavaScript and AJAX. ● JSON is not natively supported in Flex, requires a plug-in library from Adobe - http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries#corelib e.g.

×