These XML multiple-choice questions and their answers will help you strengthen your grip on the subject of XML. You can prepare for an upcoming exam or job interview with these XML MCQs.
So scroll down and start answering.
A. Hypertext Markup Language
B. Hypertext Transfer Markup Language
C. Standard General Markup Language
D. Extensible Markup Language
A. Entity declarations
B. Element declarations
C. The size of element name
D. The browser name
A. A content specific specification
B. A command line XML tool for Linux/UNIX
C. A valid XML document
D. A well formed XML document
A. CDATA works on any computer, PCDATA only works on PC's
B. PCDATA will be treated as general XML input, CDATA will be treated as a string
C. You can only use CDATA for attributes
D. You can't use characters like < and & in CDATA
A. A comment
B. Javascript instructions
C. A PCDATA space
D. A CDATA space
A. As a binary file
B. As a bitstream
C. As a hierarchical tree of nodes
D. As plaintext
A. XML
B. html
C. JSON
D. SQL
A. To make HTML more extensible and produce web documents that can be read by an XML parser
B. To challenge the dominance of HTML5
C. To make websites look better in Internet Explorer
D. To standardize the mobile web
A. DOCTYPE
B. root element
C. public indentifier
D. system identifier
A. A graph like structure, fixed schema, implied order, and no easy way to query
B. A table-like structure, a self-describing schema, and an implied ordering
C. A hierarchical structure, no ordering, and easy querying using SQL and relational algebra
D. A tree structure, a flexible schema, an implied ordering, and a way to query data called XPath
A. False
B. True
A. Indicates where the XSD is.
B. Indicates where the DTD is.
C. Indicates where to find a validating parser.
D. Points you to a CSS styling sheet.
A. SQL
B. relational algebra
C. XPath
D. JSON
A. For replacing HTML as a new standard
B. For design purposes
C. For structuring documents
D. Data exchange and representation
A. It may contain an absolute URI.
B. It can contain an absolute or relative URI with an optional fragment identifier.
C. It may contain a relative URI.
D. (All of these choices.)
A. Well-formed and validating
B. Non-validating
C. Validating
D. Well-formed
A. An image
B. A database
C. A webpage
D. A form
A. Tagged elements that can be nested, attributes for elements, and the text
B. Tagged elements that may or may not be matched, attributes and text
C. Tagged elements that can overlap, attributes, and the content in strings
D. Tagged elements that can be nested, a fixed number of attributes per element and text
A. add #REQUIRED to DTD
B. add #IMPLIED to DTD
C. add #PCDATA to DTD
D. add comment to DTD
A. As a schema
B. As a graph
C. As a fixed structure
D. As a tree
A.
B.
C.
A. &
B. >
C. <
D. >
A. Your data is irregular
B. Programs, CSS, XSL, etc. can assume a certain structure, therefore making them simpler
C. You need flexibility in the data
D. If you don't need your XML structure to be specific, it's easier to manipulate
A. Non-breaking space': It tells the parser that it should not render this piece of whitespace
B. Non-browser space': It tells browsers to ignore the character, if they're reading any *ML document
C. Non-breaking space': It tells the parser that this particular piece of whitespace is worth rendering
D. Non-browser space': It tells browsers to ignore the character, if they're reading an XML document
A. An element.
B. Another attribute.
C. Whitespace.
D. Quotes.
A. A validator for XML
B. Rules for an XML document
C. A parser for XML
D. A debugger for XML document
A. An equal sign, a nonunique name, and a set of quotes.
B. A unique name (within the document), an equal sign, and a set of quotes.
C. A unique name (within the element), an equal sign, and a set of quotes.
D. A value, an equal sign, and a unique name.
A. XML tags can be nested but HTML tags can't be nested
B. You do not need to close the tags in a XML document but you have to for the HTML document
C. HTML tags describe both the structure and the styling of the document whereas XML tags only describe the content
D. HTML documents have predefined elements, whereas XML documents do not
A. (gpa*)
B. (gpa # REQUIRED)
C. (gpa?)
D. (gpa +)
A. There are more than one attribute for each element
B. Each attribute is unique
C. Its a valid XML document
D. More than one element has the same attribute
A. False
B. True
A. Path expressions
B. XPath as component
C. Full-featured
D. Output formatting
A. It means there must be at least one student element and there is no limit to how many student elements there can be.
B. It means if there are too many student children, the validating parser will give you an error
C. It means there must be multiple students as children and there is a limit to how many student children there can be.
D. It means there must be more than one student element as a child and there is no limit to how many student children there can be.
A. The second element is the child of the first
B. The first element is an attribute of the second
C. The second element is a descendant of the first
D. They are sibling elements
A. DTD
B. RELAX-NG
C. Schematron
D. XSD
A.
B.
C. Attributes cannot have multiple values
D.
Why is this XHTML wrong?
<div class='div1' style='color: blue;' class='bodyText'>
A. An element cannot belong to multiple classes
B. An element's attributes must each be unique within the element
C. div' is not part of the XHTML namespace
D. The @style attribute must come at the end of the element
A. Version
B. Encoding
C. Version and standalone
D. Encoding and standalone
A. <XML> ... </xml>
B. XML version
C. <body> ... </body>
D. XML version, encoding, and standalone
E. <?xml-stylesheet href="xml.css" type="text/css"?>
A. Make sure your XML is valid
B. Turn an image (such as a JPG) into an SVG
C. Traverse XML documents and output other documents
D. Traverse XML documents and output XPath queries
A. occurence constraints
B. min and max values constraints
C. element constraints
D. attribute constraints
A. '
B. ^
C. &
A. Neither the @brand attribute nor the element itself are closed properly.
B. The brand and the price attributes aren't separated properly.
C. The brand attribute is missing a value.
D. The shirt has a value of american eagle but the attribute name is missing.
A. Ability to define document structures via schemas
B. Ability to read and edit documents on almost any system
C. Ability to work easily with irregular data
D. Unicode support
A.
B.
C.
D. None of the above
A. The XML document does not adhere to the specified schema.
B. The XML document is not well formed.
C. You forgot to specify where the DTD is.
D. The XML document doesn't have basic structures that an XML document should have.
A.
B.
C.
D.
A.
B.
C.
D.
E.
A. False
B. TRUE
A. Any of the above
B. An xs:enumeration inside an xs:restriction
C. An xs:length inside an xs:restriction
D. An xs:pattern inside an xs:restriction