Certified XML Developer Practice Exam, Exams of Technology

This certification evaluates proficiency in working with XML. Topics include XML syntax, schema design, parsing techniques, validation, XSLT, XPath, and utilizing XML in web development and data interchange.

Typology: Exams

2025/2026

Available from 12/25/2025

shilpi-jain-1
shilpi-jain-1 šŸ‡®šŸ‡³

4.2

(5)

29K documents

1 / 81

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Certified XML Developer Practice Exam
Question 1. What is the main requirement for an XML document to be considered well-formed?
A) It must have a DTD
B) It must have a root element
C) All tags must be uppercase
D) Attributes and elements must be mixed
Answer: B
Explanation: A well-formed XML document must have exactly one root element, with properly nested
tags.
Question 2. Which of the following is a valid XML element name?
A) 1element
B) element-name
C) element name
D) element@name
Answer: B
Explanation: XML element names cannot start with a digit, cannot contain spaces or special characters
like '@', but hyphens are allowed.
Question 3. What does the XML prolog typically contain?
A) Comments only
B) Document type declaration
C) Version and encoding information
D) Only the root element
Answer: C
Explanation: The XML prolog includes version and encoding information, such as <?xml version="1.0"
encoding="UTF-8"?>.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51

Partial preview of the text

Download Certified XML Developer Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. What is the main requirement for an XML document to be considered well-formed? A) It must have a DTD B) It must have a root element C) All tags must be uppercase D) Attributes and elements must be mixed Answer: B Explanation: A well-formed XML document must have exactly one root element, with properly nested tags. Question 2. Which of the following is a valid XML element name? A) 1element B) element-name C) element name D) element@name Answer: B Explanation: XML element names cannot start with a digit, cannot contain spaces or special characters like '@', but hyphens are allowed. Question 3. What does the XML prolog typically contain? A) Comments only B) Document type declaration C) Version and encoding information D) Only the root element Answer: C Explanation: The XML prolog includes version and encoding information, such as <?xml version="1.0" encoding="UTF-8"?>.

Question 4. How are comments written in XML? A) // This is a comment B) C) # This is a comment D) /* This is a comment */ Answer: B Explanation: XML comments must be enclosed in . Question 5. Which of the following is used to store binary data within an XML document? A) CDATA section B) Processing instruction C) Attribute D) Comment Answer: A Explanation: CDATA sections allow inclusion of characters that would otherwise be treated as markup, such as binary data. Question 6. What is the purpose of processing instructions in XML? A) To define document structure B) To provide information to applications C) To add attributes to elements D) To validate XML Answer: B Explanation: Processing instructions give directions to applications processing the XML, like <?xml- stylesheet?>.

Question 10. How is a namespace declared in an XML element? A) xmlns="namespaceURI" B) namespace="xmlnsURI" C) xml:ns="namespace" D) ns:xmlns="URI" Answer: A Explanation: Namespaces are declared using the xmlns attribute in an element, e.g., . Question 11. What is the tree structure in XML called? A) List B) Array C) Hierarchy D) Table Answer: C Explanation: XML documents are represented as hierarchical tree structures. Question 12. Which content model allows both elements and text within an XML element? A) Simple content B) Mixed content C) Element content D) Attribute content Answer: B Explanation: Mixed content allows a combination of text and child elements.

Question 13. What is required for proper nesting in XML? A) Child elements must be closed before parent elements B) Parent elements must be closed before child elements C) Elements can overlap D) Elements can be self-closing Answer: A Explanation: Well-formed XML requires that child elements are closed before their parent elements. Question 14. How is an internal DTD defined? A) Inside the XML document B) In a separate file C) Within a CDATA section D) Using a stylesheet Answer: A Explanation: Internal DTDs are defined inside the XML document within the declaration. Question 15. What does the <!ELEMENT> declaration specify in a DTD? A) Attribute types B) Entity values C) Element structure D) Namespace URI Answer: C Explanation: <!ELEMENT> declares the allowed structure/content for an element.

A) type="xs:string" B) datatype="string" C) xmltype="xs:string" D) xs:type="string" Answer: A Explanation: The type attribute specifies the data type, e.g., <xs:element name="title" type="xs:string"/>. Question 20. Which XSD construct is used to define a sequence of elements? A) <xs:choice> B) <xs:sequence> C) <xs:all> D) <xs:list> Answer: B Explanation: <xs:sequence> specifies that child elements must appear in a specific order. Question 21. What does <xs:restriction> do in an XSD? A) Defines a complex type B) Restricts the value range of a simple type C) Specifies namespaces D) Validates attributes Answer: B Explanation: <xs:restriction> restricts the allowed values for a simple type, such as setting min/max length. Question 22. Which XSD element allows you to choose one among several element options?

A) <xs:sequence> B) <xs:choice> C) <xs:all> D) <xs:list> Answer: B Explanation: <xs:choice> allows only one of its child elements to appear. Question 23. What is the purpose of <xs:key> in XSD? A) To define complex types B) To enforce unique values C) To declare namespaces D) To specify sequence ordering Answer: B Explanation: <xs:key> enforces uniqueness for specified elements or attributes within the document. Question 24. What is Schematron primarily used for? A) Tree structure validation B) Data type validation C) Business rule validation D) Encoding enforcement Answer: C Explanation: Schematron is used to enforce business rules and relationships that XSD cannot express. Question 25. How are Schematron rules defined? A) Using elements within

B) Specifies which nodes to process C) Declares variables D) Imports other stylesheets Answer: B Explanation: <xsl:template match="..."> matches nodes in the source XML for processing. Question 29. Which XSLT element outputs the value of a selected node? A) <xsl:copy> B) <xsl:value-of> C) <xsl:output> D) <xsl:apply-templates> Answer: B Explanation: <xsl:value-of> extracts and outputs the value of the selected node. Question 30. How is iteration achieved in XSLT? A) <xsl:for-each> B) <xsl:if> C) <xsl:choose> D) <xsl:copy-of> Answer: A Explanation: <xsl:for-each> iterates over a set of nodes. Question 31. What is the purpose of XSLT modes? A) To format output B) To apply templates differently for different contexts

C) To declare variables D) To import stylesheets Answer: B Explanation: Modes allow the same template to be applied differently depending on context. Question 32. How can you modularize XSLT stylesheets? A) <xsl:include> and <xsl:import> B) <xsl:copy-of> C) <xsl:variable> D) <xsl:for-each> Answer: A Explanation: <xsl:include> and <xsl:import> enable stylesheet modularity. Question 33. Which function is used to concatenate strings in XSLT/XPath? A) string-join() B) concat() C) combine() D) join() Answer: B Explanation: concat() combines multiple strings into one. Question 34. How do you declare a variable in XSLT? A) <xsl:variable> B) <xs:variable> C) <xsl:param>

D) following Answer: C Explanation: The parent axis selects the immediate parent node. Question 38. How is an attribute selected in XPath? A) @attributeName B) attribute(attributeName) C) /attributeName D) #attributeName Answer: A Explanation: Attributes are selected using the '@' symbol, e.g., @id. Question 39. What does the XPath function count() return? A) The length of a string B) The number of nodes in a node-set C) The sum of node values D) The number of attributes Answer: B Explanation: count() returns the number of nodes in a node-set. Question 40. Which XPath function returns the string length of a node? A) substring() B) string-length() C) length() D) count()

Answer: B Explanation: string-length() returns the number of characters in a string. Question 41. What does FLWOR stand for in XQuery? A) Find, List, Write, Order, Return B) For, Let, Where, Order by, Return C) For, Loop, Write, Output, Return D) Format, List, Write, Order, Respond Answer: B Explanation: FLWOR stands for For, Let, Where, Order by, Return, the main clauses in XQuery. Question 42. Which clause in FLWOR expressions is used for filtering results? A) FOR B) LET C) WHERE D) RETURN Answer: C Explanation: WHERE clause is used to filter results based on conditions. Question 43. Which clause in FLWOR expressions allows you to sort results? A) ORDER BY B) LET C) FOR D) RETURN Answer: A

Question 47. Which XML API is event-based and suitable for large documents? A) DOM B) SAX C) StAX D) XSLT Answer: B Explanation: SAX is event-based and ideal for processing large documents without loading the entire tree into memory. Question 48. What is the main feature of StAX compared to SAX and DOM? A) Pull parsing model B) Tree structure representation C) Schema validation D) Streaming output Answer: A Explanation: StAX uses a pull parsing model, allowing the application to control parsing. Question 49. Which Java API is commonly used for XML processing? A) JAXP B) JAXB C) JDOM D) XOM Answer: A Explanation: JAXP (Java API for XML Processing) supports DOM, SAX, and StAX.

Question 50. What does SOAP stand for in XML web services? A) Simple Object Access Protocol B) Structured Object Application Protocol C) Secure Object Access Protocol D) System Object Access Protocol Answer: A Explanation: SOAP stands for Simple Object Access Protocol, used in XML-based web services. Question 51. What is the root element of a SOAP message? A) <soap:body> B) <soap:header> C) <soap:envelope> D) <soap:message> Answer: C Explanation: <soap:envelope> is the root element containing the header and body. Question 52. What type of information does WSDL provide? A) Document encoding B) Service operations and messages C) Data encryption D) Web server configuration Answer: B Explanation: WSDL describes service operations, message formats, and binding information.

A) CDATA section B) Attribute value C) Entity reference D) Comment Answer: A Explanation: CDATA sections permit inclusion of markup characters as raw text. Question 57. Which attribute specifies the XML version? A) encoding B) version C) standalone D) xmltype Answer: B Explanation: The version attribute specifies the XML version, e.g., version="1.0". Question 58. How are empty elements represented in XML? A) B) C) <element:empty/> D) <empty-element/> Answer: B Explanation: Empty elements can be written as self-closing tags, e.g., . Question 59. Which is a valid character for XML element names? A) Space

B) Underscore C) Exclamation mark D) Colon at start Answer: B Explanation: Underscores are valid; spaces and special characters are not allowed, and colons can't be at the start. Question 60. What is the difference between elements and attributes in XML? A) Elements store only metadata B) Attributes store structured data C) Elements store hierarchical data, attributes store metadata D) Attributes can have child elements Answer: C Explanation: Elements store hierarchical and structured data, while attributes hold metadata. Question 61. What is the function of the standalone attribute in the XML declaration? A) Specifies encoding type B) Indicates if external markup declarations are used C) Sets the root element D) Declares namespaces Answer: B Explanation: standalone="yes" means the document does not rely on external markup declarations. Question 62. Which special character must always be escaped in XML content? A) %