Creating Xml Doc Flashcards
What is an element?
Describes or contains a piece of information
Form the basis of XML docs
Consists of 1)opening tag and 2) closing tag
Always appear as opening tag - optional data - closing tag
Examples of XML tags
Rare there is no data in between
The following shows how one elements can contain additional elements
Pet or friend
Elements
Tag
Empty tag
Element that doesn’t contain any content within its opening and closing tags
Abbreviated:
Ex. Empty tags =
The space in is necessary.
False. It is a standard style among XML developers
You can attach attributed to empty elements
True.
What is an attribute?
Small piece of info that appear within an elements opening tag
Consists of attribute name and corresponding attribute value which is separated by =
What is the value of an attribute?
Appears to the right of the =
Must appear within quotes
"Nick" is value
XML structures HTML in which you MUST use “” with attributes
TRUE!!!!
You can use several different attributes with a single element.
True.
Ex.
What is a nonempty element?
Element that contains content within the opening and closing tags
Can be text or additional elements
What is a nested element?
Element(s) that is contained without another element(s)
“Apartment building “ example for nesting elements
- Apartment building
- individual apartment within the building
- Individual rooms within individual apartments
- Furniture within individual rooms
- Belongings stored within furniture
Belonging elements are empty elements ( abbreviated with empty tag /> )
They are not required to house any additional info
Meaning you can describe the belonging elements solely through attributes
Non empty elements (room, furniture, apartment, apartmentbldg) often contain text content which appears between opening and closing tags