XML Tutorial #5 : Ancestor and Descendant

In this part of tutorial i will define some words that may come in front of you many times during xml coding … those are

— Ancestor

— Descendant

— Parent

— Child

— Sibling

Before i make a description of those lets create a xml code …








well in this code … <grand_parents>,<parents> are ancestor cause they have descendants .. that means <grand_parents> contains two other element and <parents> also contains elements .. but <me> and <my_brother> are not ancestor cause they does not contain any element

Again ,, <parents> and <me> and <my_brother> are descendant cause they have a root/parents …

One think you may notice that <parents> is also a descendant and ancestor .. cause <parents> have child and parent ..

— Siblings are <me> and <my_brother>

— parent are child are too much easy to understand .. they are in regular meaning …

By kfelahi Posted in XML

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s