csp-10-2-1: An XML document can be depicted using what kind of structure?
Paragraph
Paragraph structure is a writing style, not a coding outline.
Tree
An XML document can be depicted as a tree structure where there is a top element, and other tags are drawn as children of their parent elements.
Stem and Leaf
Stem and Leaf is a plot used to display quantitative data, where each data value is split into a "leaf" (usually the last digit) and a "stem" (the other digits).
Nested
While the structure of XML is inherently nested, it follows a tree structure.
2.
csp-10-2-2: What language is XML most similar to?
CSS
CSS is a language that describes the style of an HTML document.
Python
Python is a programming language, but is quite different than XML.
JavaScript
JavaScript is the programming language of HTML and the Web. It looks pretty different from XML.
HTML
HTML is the standard markup language for Web pages. It is very similar to XML, though XML is more structured.
3.
csp-10-2-3: Which function searches through the XML tree and retrieves the element that matches the specified tag.
find
The find function searches through the XML tree, retrieving the element that matches the tag.
findtag
This is not a real function.
match
match is an attribute that can be used to associate a template with an XML element.
xmltag
This is not a real function.
4.
csp-10-2-4: True or False? An XML tree can only have one node.
True
Try again!
False
An XML tree usually has multiple nodes.
5.
csp-10-2-5: The JSON format is most similar to which of the following?
JavaScript arrays
The JSON format was inspired by the object and array format used in the JavaScript language, but was influenced and looks nearly identical to Python lists and dictionaries.
JavaScript
JSON is text, written with JavaScript object notation, but the format is nearly identical to one of the other options.
XML nodes
JSON and XML are used for similar purposes, but JSON is written with simpler structures.
Python lists and dictionaries
Python's syntax for dictionaries and lists influenced the syntax of JSON. So the format of JSON is nearly identical to a combination of Python lists and dictionaries
6.
csp-10-2-6: True or False? JSON maps directly to dictionaries and lists.
True
JSON is a very natural format to use, as it maps directly to some combination of dictionaries and lists.
False
Try again!
7.
csp-10-2-7: There is an industry trend away from _______.
XML
JSON is simpler and more directly maps to native data structures we already have in programming languages, the parsing and data extraction code is usually simpler and more direct when using JSON.
JSON
XML is more self descriptive than JSON, but does not have the simpler and more direct mapping that JSON has.
8.
csp-10-2-8: Which format is constructed by nesting dictionaries and lists as needed.
XML
Try again!
JSON
JSON is constructed by nesting dictionaries and lists as needed.
9.
csp-10-2-9: Which of the following are used for security surrounding API usage?
Combination Code
Try again! Some sort of password may be used, but not one that is intended for a combination lock.
API Key
An API Key is used by vendors to know who is using their services and how much each user is using.
OAuth
OAuth is used to send cryptographically signed messages using shared keys and secrets.