Creating Xml Doc Flashcards

1
Q

What is an element?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Examples of XML tags

A

Rare there is no data in between

The following shows how one elements can contain additional elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Pet or friend

A

Elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A

Tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Empty tag

A

Element that doesn’t contain any content within its opening and closing tags

Abbreviated:
Ex. Empty tags =

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The space in is necessary.

A

False. It is a standard style among XML developers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You can attach attributed to empty elements

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an attribute?

A

Small piece of info that appear within an elements opening tag

Consists of attribute name and corresponding attribute value which is separated by =

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the value of an attribute?

A

Appears to the right of the =

Must appear within quotes

 "Nick" is value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

XML structures HTML in which you MUST use “” with attributes

A

TRUE!!!!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You can use several different attributes with a single element.

A

True.

Ex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a nonempty element?

A

Element that contains content within the opening and closing tags
Can be text or additional elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a nested element?

A

Element(s) that is contained without another element(s)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

“Apartment building “ example for nesting elements

  1. Apartment building
  2. individual apartment within the building
  3. Individual rooms within individual apartments
  4. Furniture within individual rooms
  5. Belongings stored within furniture
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How would you make the belonging element nonempty in the apartment building example ?

A

//opening tag
//opening tag
Dear Michael,
I am pleased to announce you have won our
sweepstakes. If you would purchase 5 or more
magazine subscriptions you may win money.
//closing tag
//closing tag

17
Q

What are the five commandments of XML?

A
  1. tag names are case sensitive
  2. Every opening tag must have corresponding closing tag - unless it is abbreviated as an empty tag />
  3. A nested tag pair cannot overlap another tag
  4. Attribute values must appears within quotes
  5. Every document must have a root element
18
Q

are all the same.

A

FALSE. XML is case sensitive

19
Q

What are the three fundamental building blocks XML relies on?

A

Elements
Attributes
Values