Ryan's District Boards

Computer, programming, and webmaster help , support , tips and tricks => Tutorials Zone! => Internet webmaster computer programming technology tips and tricks => XML Tutorials => Topic started by: ben2ong2 on October 05, 2006, 05:03:32 PM

Title: XML Elements have Relationships
Post by: ben2ong2 on October 05, 2006, 05:03:32 PM
Elements are related as parents and children.
To understand XML terminology, you have to know how relationships between XML elements are named, and how element content is described.
Imagine that this is a description of a book:
My First XMLIntroduction to XML·   What is HTML·   What is XMLXML Syntax·   Elements must have a closing tag·   Elements must be properly nested
Imagine that this XML document describes the book:
<book><title>My First XML</title><prod id="33-657" media="paper"></prod><chapter>Introduction to XML<para>What is HTML</para><para>What is XML</para></chapter><chapter>XML Syntax<para>Elements must have a closing tag</para><para>Elements must be properly nested</para></chapter></book>
Book is the root element. Title, prod, and chapter are child elements of book. Book is the parent element of title, prod, and chapter. Title, prod, and chapter are siblings (or sister elements) because they have the same parent.