Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free XML Master Professional Application Developer I10-002 Exam Questions

Last updated: · 10 practice questions with answers and explanations

Page: 1 / 8 Total 80 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Section 1 - DOM / SAX

Skill tested: Applies DOM node ownership rules when transferring nodes between documents.

A Java service assembles a report by parsing two XML files into separate DOM documents. It must move a selected element, including its descendants, from the second document into the first document. The implementation currently calls appendChild on the destination element and receives a WRONG_DOCUMENT_ERR. The team wants to preserve the selected subtree and its attributes, and does not need to retain the original node object or its identity. Which approach best meets these requirements?

Correct Answer: A. Call importNode(selected, true) on the destination document, then append the imported node.
Explanation:

A node created by one DOM Document cannot normally be inserted into a different document as-is. The destination document's importNode method creates a node owned by that destination; the true argument requests a deep copy of the subtree, after which it can be appended. normalize() concerns adjacent text nodes, not ownership. cloneNode() copies the subtree but does not make the clone belong to the destination document. adoptNode() is called on the document that will adopt the node, and adoption transfers rather than copies it; calling it on the source is incorrect and identity preservation is not required.

Question 2

New Multiple answers

Topic: Section 1 - DOM / SAX

Skill tested: Selects SAX2 namespace and whitespace settings appropriate for event-driven parsing.

A Java ingestion service processes large XML files that use namespace-qualified elements. It must identify elements by namespace URI and local name, and it must discard indentation-only character data while preserving text that contains meaningful content. The service uses a SAX2 XMLReader and cannot build a DOM tree because memory is limited. Which two implementation choices best satisfy the requirements? Select TWO.

Correct Answer: A. In characters(), ignore a callback only when its content consists entirely of XML whitespace characters.; C. Enable the reader's namespace processing feature and branch on each element's namespace URI and local name.
Explanation:

SAX namespace processing supplies namespace-aware element information, allowing the handler to compare namespace URI and local name rather than relying on prefixes, which can vary. Character data may arrive in multiple callbacks, and formatting whitespace can be reported along with other text. The handler should ignore a chunk only when it consists entirely of XML whitespace, while retaining meaningful text; applications that accumulate element text must also account for multiple callbacks. Prefix reporting does not replace namespace-aware matching. Validation does not automatically strip whitespace, and treating each callback as a complete value can lose data.

Question 3

New Single answer

Topic: Section 2 - DOM / SAX Programming

Skill tested: Accumulates fragmented SAX character data while distinguishing element text from indentation.

A Java SAX handler extracts the text of a namespaced element. Tests pass for short inputs but fail when descriptions contain entity references or are split by the parser into multiple characters() calls. The document also contains indentation between child elements, which should not be included in the extracted description. The handler already tracks the current element using namespace URI and local name. What is the most reliable adjustment?

Correct Answer: B. Append characters() content to a buffer while inside description, then use the accumulated text when its endElement event occurs.
Explanation:

SAX does not guarantee that an element's character content arrives in a single characters() callback. A handler should accumulate callback data while it is within the target element and finalize it at the corresponding endElement event. This also gives the code a clear scope in which to apply any whitespace policy, rather than confusing indentation outside the element with its text. Direct assignment can discard earlier or later fragments. startElement supplies element metadata, not its later content, and prefix reporting does not change character-data segmentation.

Question 4

New Multiple answers

Topic: Section 3 - XSLT

Skill tested: Uses XSLT template precedence, modes, and parameters to produce distinct transformations.

A publishing pipeline receives a source document whose elements are in the namespace urn:catalog. One imported stylesheet provides a generic identity transformation, while the principal stylesheet must render only product elements in a compact summary and receive a currency label from the calling application. Other elements must not appear in the summary. Which two stylesheet design choices meet these requirements? Select TWO.

Correct Answer: C. Declare a product template that matches the namespace-qualified product name, has higher import precedence than the generic rule, and runs in a dedicated mode.; E. Pass the currency label as a top-level xsl:param and reference it where the summary is generated.
Explanation:

In XSLT, a source namespace must be bound to a prefix in the stylesheet and used in match patterns; a source document's default namespace does not automatically qualify an unprefixed XPath name test. A more specific principal-stylesheet rule can override an imported generic identity rule through import precedence, and a dedicated mode can isolate the summary processing. A top-level parameter allows the calling application to supply the currency label. A variable is not an externally supplied parameter, and simply declaring a mode does not suppress output unless the relevant templates and apply-templates calls use it.

Question 5

New Single answer

Topic: Section 3 - XSLT

Skill tested: Applies attribute value templates and namespace bindings in literal result elements.

A team maintains an XSLT stylesheet that emits HTML links for records in an XML document. Each record has an id attribute, and the generated link must use that value in its href. The source records are in a default namespace, so the stylesheet already binds that namespace to the prefix r. The current output contains the literal text { @id } in the href instead of the record value. Which change correctly fixes the output?

Correct Answer: D. Write href="{@id}" on the literal result element and select records using the stylesheet's r prefix.
Explanation:

An attribute value template evaluates expressions enclosed in braces in an attribute of a literal result element, so href="{@id}" inserts the current record's id value. The stylesheet must still select namespace-qualified source elements with the bound prefix r; unprefixed XPath name tests do not match elements in the source default namespace. The expression r:id would refer to a child element named id in a namespace, not the unqualified id attribute. xsl:attribute is valid for constructing attributes, but its name attribute is not an AVT for selecting an attribute value.

Question 6

New Single answer

Topic: Section 4 - XML Schema

Skill tested: Chooses include versus import for schemas with matching or differing target namespaces.

An organization separates its schema files by business area. The order schema has target namespace urn:orders and needs to use a globally declared AddressType from a customer schema whose target namespace is urn:customers. Both namespaces must remain distinct, and the team wants validation to resolve AddressType through the schema composition. Which schema design is appropriate?

Correct Answer: D. Use xs:import with namespace urn:customers and schemaLocation for the customer schema, then reference its type using a prefix bound to urn:customers.
Explanation:

xs:import is the mechanism for bringing declarations from a different target namespace into a schema. The namespace attribute identifies the imported namespace, while schemaLocation can identify the schema document; the type reference uses a prefix bound to urn:customers. xs:include is intended for schema documents with the same target namespace, or for no-namespace schema composition under applicable rules. Removing the order namespace changes the design, while copying the type duplicates declarations and does not compose the schemas as requested.

Question 7

New Multiple answers

Topic: Section 5 - XML Processing System Design Technology

Skill tested: Distinguishes XML signature canonicalization from exclusive canonicalization and encryption.

A B2B gateway signs an XML element that will be embedded within different SOAP envelopes. The receiver verifies the signature after the element has been moved, and the signing policy requires namespace declarations used by the signed element to be handled without pulling in unrelated ancestor namespace context. The gateway must also protect the element's confidentiality for its intended recipient. Which two statements correctly guide the design? Select TWO.

Correct Answer: B. Use Exclusive XML Canonicalization for the signature reference when the policy calls for limiting inherited namespace context in the canonicalized subset.; C. Use XML Encryption to protect the selected XML data for the intended recipient; encryption serves a different purpose from signing.
Explanation:

A signature authenticates signed data and supports integrity checking; it does not make that data confidential. XML Encryption can protect selected XML content for an intended recipient. Exclusive XML Canonicalization is designed for canonicalizing a subset without unnecessarily including ancestor namespace context that is not visibly used, which is relevant when signed content moves between envelopes. Ordinary Canonical XML does not simply omit inherited context in every case. Encryption alone does not establish the sender's identity or integrity, and canonicalization is not encryption.

Question 8

New Single answer

Topic: Section 5 - XML Processing System Design Technology

Skill tested: Interprets WSDL bindings and service endpoints for interoperable SOAP integration.

A supplier provides a WSDL 1.1 contract for an order service. The abstract interface defines operations and messages, while the service section lists an address for each deployed endpoint. A client team must generate a SOAP client for a specified endpoint and avoid hard-coding assumptions about the transport or message style. Which contract elements should the team inspect together to determine how to construct and send requests?

Correct Answer: B. The portType, binding, and service port, using the binding for protocol and message details and the service port for the endpoint address.
Explanation:

In WSDL 1.1, the portType describes abstract operations, the binding specifies concrete protocol and message-format details, and a service port associates a binding with a deployed endpoint address. The client needs these together to understand both the request representation and where to send it. Types and messages describe data structures and message parts, not the deployed address. A service port references a binding rather than duplicating its operation details, and omitting the binding leaves essential concrete SOAP behavior unspecified.

Question 9

New Single answer

Topic: Section 6 - Utilizing XML

Skill tested: Designs consistent namespace and schema boundaries for an XML-based business system.

A company is defining an XML exchange for purchase orders. Its purchasing application owns order structures, while an independently maintained party registry owns customer and supplier identifiers. Both teams need to evolve their schemas separately, and documents must clearly distinguish the two vocabularies. The integration must validate documents without copying registry declarations into the purchasing schema. Which design is most appropriate?

Correct Answer: A. Assign a target namespace to each vocabulary, import the registry schema into the order schema, and qualify cross-namespace references with the registry namespace.
Explanation:

Separate target namespaces establish clear ownership and prevent similarly named declarations from colliding. The purchasing schema can import the registry schema because the vocabularies have different target namespaces, then reference registry declarations through a prefix bound to the registry namespace. This supports independent schema evolution and validation without copying declarations. A single namespace obscures ownership, while include is not the correct composition mechanism for differing target namespaces. Relying on order instead of names and namespaces is fragile and does not satisfy the stated validation and separation requirements.

Question 10

New Multiple answers

Topic: Section 6 - Utilizing XML

Skill tested: Combines DOM document creation with schema-compatible namespace-aware element construction.

A Java application must construct an XML purchase order in memory and serialize it for validation against a schema. The root element belongs to urn:orders, while each line references a product element from urn:products. The output must have correct expanded names regardless of the prefixes chosen by the serializer. Which two implementation choices are appropriate? Select TWO.

Correct Answer: C. Create namespace-aware elements with createElementNS using the appropriate namespace URI and qualified name for each vocabulary.; E. Create the product element with createElementNS using urn:products and ensure its prefix is bound to urn:products in the serialized document.
Explanation:

Namespace-aware DOM construction should use createElementNS so each node has the intended namespace URI and local name in the DOM data model. The products element must be created in urn:products, and the serialized document must provide a binding for whatever prefix is used to represent that namespace. Prefix spelling alone does not establish identity; the namespace URI does. Adding xmlns attributes after creating non-namespace-aware nodes does not reliably change their DOM namespace identity, and an element created in urn:orders remains in that namespace even if an xmlns declaration is later added.