1.3.3. XML Elements
XML elements are extensible and they have relationships.
XML elements have relationships
To understand XML terminology, you have to know how relationships between XML elements are named, and how element content is described. We still look at the Person Example:
Relationship between XML elementsAs you can see XML elements are always related as parents and children.
Exercise
Open the following XML-document in a browser and have a look at it.
Define the root, parent, child and sister elements of the XML-file. Hand in your
results to the tutor.
Link to the XML-File: cartouche.xml
XML elements are extensible
Look at the following XML example:
An XML ExampleLet's imagine that we created an application that extracted the <first_name>, <last_name>, <street>, <number>, and <city> elements from the XML document to produce this output:
Application OutputImagine that the author of the XML document added some extra information to it:
Expanded XML ExampleWill the application break or crash? What do you think? The answer is given in the popup window below. (Click here for more information)