![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
XML (Extensible Markup Language) is becoming the standard for the interchange of structured data in Internet applications. You can integrate data in Flash with servers that use XML technology to build sophisticated applications, such as chat systems or brokerage systems.
In XML, as with HTML, you use tags to mark up, or specify, a body of text. In HTML, you use predefined tags to indicate how text should appear in a web browser (for example, the <b>
tag indicates that text should be bold). In XML, you define tags that identify the type of a piece of data (for example, <password>VerySecret</password>
). XML separates the structure of the information from the way it's displayed, so the same XML document can be used and reused in different environments.
Every XML tag is called a node, or an element. Each node has a type (1, which indicates an XML element, or 3, which indicates a text node), and elements may also have attributes. A node nested in a node is called a child node. This hierarchical tree structure of nodes is called the XML Document Object Model (DOM)much like the JavaScript DOM, which is the structure of elements in a web browser.
In the following example, <PORTFOLIO>
is the parent node; it has no attributes and contains the child node <HOLDING>
, which has the attributes SYMBOL
, QTY
, PRICE
, and VALUE
:
<PORTFOLIO> <HOLDING SYMBOL="RICH" QTY="75" PRICE="245.50" VALUE="18412.50" /> </PORTFOLIO>
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |