News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

XML Elements have Relationships

Started by ben2ong2, October 05, 2006, 05:03:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ben2ong2

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.

You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login