Each pair of opening (e.g., <person>) and closing tags (e.g., <\person>) represents a element or node with the same name as the tag (e.g., person). Each element can have some text, some attributes (e.g., hide), and other nested elements. If an XML element is empty (i.e., has no content), then it may be depicted by a self-closing tag (e.g., <email />).
1.
csp-10-2-1: In XML, a pair of opening and closing tags (<> and <\>) represent what? Select all that apply.
element
A pair of tags in XML can represent an element.
string
A pair of tags in XML does not represent a string.
node
A pair of tags in XML can represent a node.
method
A pair of tags in XML does not represent methods.
Often it is helpful to think of an XML document as a tree structure where there is a top/root element (here: person), and other tags (e.g., phone) are drawn as children of their parent elements.
2.
csp-10-2-2: What are the sibling tags of the email tag?
person
The person tag is the parent tag of the email tag.
name
The name tag is a sibling of the email tag.
phone
The phone tag is a sibling of the email tag.
hide
The hide is an attribute name of the email tag.
3.
Click on all of the self-closing tags in the XML below.
Put the blocks into order to define just the body of simple XML document that defines a note. A note has a date, subject, and a body in that order. Indent the blocks to show the structure (parent and child).
Put the blocks into order to define just the body of simple XML document that stores information for a message: to, from, time, subject, and body in that order. Indent the blocks to show the structure (parent and child).