\/\/\/\/\/\/\/\/\/\/
To declare a document type you use a DOCTYPE tag:
To define a document type you use DTD or XML Schema or Relax NG or Schematron.
\/\/\/\/\/\/\/\/\/\/
Answer: No.
\/\/\/\/\/\/\/\/\/\/
Just 1 root element. The root element must be the first defined element.
\/\/\/\/\/\/\/\/\/\/
The standalone attribute means that the DTD is embedded in the XML document inside the DOCTYPE attribute. Because the use of this technique is discouraged, the standalone attribute should never be used.
Is the Description element mandatory in a valid XML file ?
\/\/\/\/\/\/\/\/\/\/
No. The sub-elements of Root are declared using the or '|' operator. No sub-element from the list is mandatory but at least 1 sub-element must be present because the cardinal operator used for all sub-elements is '+'.
\/\/\/\/\/\/\/\/\/\/
No. When the #FIXED attribute is specified you must provide a default value for the respective field - in this case "Author":
What is happening if the parsed XML has a "Description" element that does not have the "Author" attribute ? Is this valid XML ?
\/\/\/\/\/\/\/\/\/\/
Yes. The parser will take the default value from the DTD file and it will supply that attribute as if it was read from the XML file itself. No parsing error is triggered.
\/\/\/\/\/\/\/\/\/\/
No. Attrbutes *cannot* be specified in the ending tags.
\/\/\/\/\/\/\/\/\/\/
No. There cannot be 2 attributes with the same name (phone in this case). The above text can become valid XML if it is written like this:
\/\/\/\/\/\/\/\/\/\/
No. The specification does not mentions this, so the order of attributes is not guaranteed.
\/\/\/\/\/\/\/\/\/\/
Yes. The order in which the elements are defined must be retained. The XML specification specifically mention this issue so any parser that do not follow this rule is invalid.
\/\/\/\/\/\/\/\/\/\/
No. Tags can be nested but *not* interlaced.
\/\/\/\/\/\/\/\/\/\/
\/\/\/\/\/\/\/\/\/\/
Yes. It can be done, but the more useful approach is to use the attribute's name to get it because the application cannot handle unknown attributes anyway.
\/\/\/\/\/\/\/\/\/\/
DocumentBuilderFactory & DocumentBuilder. Take a look at the following code:
\/\/\/\/\/\/\/\/\/\/
First form.
\/\/\/\/\/\/\/\/\/\/
No. A tag must end with ">" and not with "-->". Only comments can end with "-->".
\/\/\/\/\/\/\/\/\/\/
No. The "content category" of an element can only be "ANY" or "EMPTY", thus the following definitions are valid:
A "content model" can only be specified between paranthesis:
This element - "RPLClient" - has one mandatory children of type name "TestSession".
\/\/\/\/\/\/\/\/\/\/
Yes. Because of this the use of DTD is very widespread.
\/\/\/\/\/\/\/\/\/\/
No. Only one DTD can be associated with a given XML document but the DTD can be specified simultaneously in the XML document itself (in this case it's called an 'internal subset') and in an external file (in this case it's called an 'external subset').
I wish you success in your certification effort.
If you wish to add something feel free to use the forums.