First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Chris Smith | Website: http://

XML - More Complexity

XML is far more complex than my timid little example. Each XML tag can contain text of it's own, child tags (that is, tags which fall within another open and close tag), and even attributes:

<%lt%>person id="12345"<%gt%> <%lt%>-- note the 'id' attribute
...
<%lt%>/person<%gt%>

XML itself is just what it looks like, human readable tags which order and describe the data within them. XML is broken up into a hierarchy of nodes. Each node can contain 0 or more child nodes. In XML, each node can, by itself, be considered a separate XML document, with it's children as the elements of that xml document. Here's a simple example:

<%lt%>?xml version="1.0" encoding="iso-8859-1" ?<%gt%> 

<%lt%>parent_node<%gt%>
    <%lt%>child_node id="1"<%gt%>
        <%lt%>grandchild_node<%gt%>GrandChild 1a<%lt%>/grandchild<%gt%>
        <%lt%>grandchild_node<%gt%>GrandChild 1b<%lt%>/grandchild<%gt%>
    <%lt%>/child_node<%gt%>
    <%lt%>child_node id="2"<%gt%>
        <%lt%>grandchild_node<%gt%>GrandChild 2a<%lt%>/grandchild<%gt%>
        <%lt%>grandchild_node<%gt%>GrandChild 2b<%lt%>/grandchild<%gt%>
    <%lt%>/child_node<%gt%>
<%lt%>/parent_node<%gt%>

So, the parent_node tag is the parent of both the child_node tags. The child_node tag with the id of 1 is the parent of the two grandchild_node tags within it, and so on. Any tag which contains something is said to be those things' parent node. Any element inside a set of tags is one of that tag's child nodes. Not too hard, huh?

» Level Advanced

Added: 2000-12-13
Rating: 9 Votes: 705
(10 being the highest)
» Author
No information about the author has been provided
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.