Exam Information
Free practice questions with explanations
XML I10-002 Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 16
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice DOM / SAX
A logistics company ingests a 4 GB XML manifest nightly on a server with 2 GB of heap. Each record must be validated and written to a database as soon as it is read, and no part of the file may be held in memory after processing. The team proposes building a full DOM tree with the Java DOM parser and then iterating over the child nodes. Which approach best meets the requirements?
Correct Answer: AExplanationSAX is a push-based event parser that reports elements through callbacks without constructing a tree, so memory use stays bounded regardless of file size. Handling endElement for each record allows the write to occur before the parser moves on. Deferred expansion is not a DOM Level 2 Core feature that avoids building the tree, and ignoring whitespace removes only text nodes while the element structure still consumes the same heap. The pull-parser option is outside the SAX-based approach the scenario calls for, and building a subtree per record still relies on DOM objects, which the scenario does not allow once the record is processed.
-
2 Question 2 Single choice DOM / SAX Programming
A developer writes a Java routine that reads a catalogue XML file using the DOM Level 2 Core API. The catalogue uses the default namespace urn:example:catalogue and a prefixed element cat:price. The routine calls document.getElementsByTagName("price") and returns zero nodes, although the file clearly contains prices. The factory is already set to namespace-aware processing. The fix must keep DOM and not change the source document. Which change is correct?
Correct Answer: AExplanationWhen a parser is namespace-aware, DOM Level 2 elements are matched by namespace URI and local name, and getElementsByTagNameNS is the method designed for that lookup. The prefix is not part of the matching key, so the qualified name approach depends on whatever prefix the document happens to use. Getting all elements with the asterisk wildcard works but is not namespace-correct and ignores the requirement to target the namespace. Retrieving an attribute from the root does not address the element in question.
-
3 Question 3 Single choice XSLT
A publisher uses an XSLT 1.0 stylesheet to transform product feeds. Two imported stylesheets each define a template matching product with no mode attribute, and the main stylesheet imports both and also defines its own template matching product. The main stylesheet's template must win for every product, and the output of the other two must never be used for product elements. Which change meets the requirement with the least risk?
Correct Answer: DExplanationImport precedence is decided first, and templates in the importing stylesheet already have higher import precedence than imported ones, so the local template wins on that basis. Assigning a priority is still a valid way to make the intent explicit when precedence and match patterns could otherwise conflict, and a higher priority value resolves any remaining ambiguity in the importing stylesheet. Placing import elements after other declarations is a syntax error in XSLT 1.0, since imports must come first. Adding modes changes which template is selected and would leave the default-mode product output unhandled. xsl:include merges stylesheets at the same precedence, which creates a conflict instead of resolving one.
-
4 Question 4 Single choice XML Schema
A healthcare consortium defines a schema for lab results in namespace urn:example:lab, and the schema imports a shared types schema from urn:example:common. The shared schema is maintained by another team, and the lab schema must reference its simple type MeasurementUnit without copying it. The architect asks that the schema not require the common schema to be co-located on the same path, and that the import declare the namespace explicitly. Which declaration in the lab schema is correct?
Correct Answer: CExplanationxsd:import is used to reference components in a different target namespace, and the namespace attribute must match the imported schema's targetNamespace, while schemaLocation gives the location hint. Import elements must appear before other top-level declarations. Include only works for a schema with the same target namespace, so it cannot bring in urn:example:common components. Omitting schemaLocation depends on external resolution, which the architect has not agreed to, though a catalog could help. Redefine replaces definitions from the other schema and is not needed simply to reference a type.
-
5 Question 5 Single choice XML Processing System Design Technology
A bank exchanges signed payment messages over SOAP with a partner. The message body contains an XML fragment that is signed and then re-serialized by an intermediary that adds a new namespace declaration to the root and reorders attributes. The partner's signature verification now fails although the content is unchanged. The bank must keep the signature inclusive of namespace declarations that the signed fragment inherits from its ancestors, and must not change the signature algorithm. Which action best resolves the problem?
Correct Answer: AExplanationCanonical XML 1.0 includes all in-scope namespace declarations inherited from ancestors, which is the inclusive behaviour the bank needs, and it normalizes attribute order so re-serialization with reordered attributes does not change the digest. The scenario is about the verifier's canonicalization, and the stated requirement keeps inherited namespaces in scope. Exclusive canonicalization drops unused inherited namespaces, which is the behaviour the bank does not want. Changing the digest algorithm does not affect canonicalization, and signing the whole envelope would be a different design that the partner did not agree to and that still depends on the same canonicalization rules.
-
6 Question 6 Single choice Utilizing XML
A retailer is building a sample XML order system with separate namespaces for orders, customers and shipments. The team has an XML Schema for each namespace. Developers must create test order documents using DOM, parse incoming shipment messages with SAX, and transform order documents into an HTML invoice with XSLT. The schema for shipments must be reused by the order schema without duplicating its declarations, and each namespace should be declared only in the document elements that need it. Which design best satisfies the requirements?
Correct Answer: CExplanationSeparate target namespaces keep the three vocabularies distinct, and xsd:import is the correct mechanism to reference components from another target namespace without copying them. Declaring prefixes where they are used keeps the scope of each namespace limited, which matches the constraint. Declaring all namespaces on the root and copying types creates duplicate definitions and fails the no-duplication requirement. A single namespace removes the separation the design depends on. Include cannot bring components from a different target namespace into the order schema.
-
7 Question 7 Multiple choice DOM / SAX Programming
A team builds a Java service that reads XML configuration files using a SAX parser. Files come from vendors that sometimes include DOCTYPE declarations with external entities, and some files contain indentation whitespace inside element content that must be preserved for a legacy field. The service must not resolve external entities for security reasons and must still process element content events for the configured data. Which two actions together meet the requirements? (Choose two.)
Correct Answer: A, CExplanationSetting the external-general-entities feature to false prevents the parser from resolving external general entities, which addresses the security concern directly. Whitespace inside element content is delivered through the characters callback, so accumulating text there preserves the legacy field's content while still processing the configured data. Turning off namespace processing does not stop entity resolution and breaks namespace handling. Enabling validation does not make content whitespace ignorable without a DTD declaring element content, and the scenario does not describe that. Implementing ignorableWhitespace would discard whitespace the legacy field needs.
-
8 Question 8 Multiple choice XSLT
A media company uses an XSLT 1.0 stylesheet to render an article catalogue. The stylesheet is run by a processor that does not support the XSLT 2.0 function format-date, and the rendering must still produce output when that function is unavailable. The stylesheet also needs an attribute value template to set a CSS class from a parameter and must pass a runtime date into the transform from the command line. Which two constructs together meet these requirements? (Choose two.)
Correct Answer: D, EExplanationxsl:fallback is the mechanism XSLT provides for supplying behaviour when an instruction or extension is not available, which is exactly the situation the company faces. Attribute value templates are written by placing an expression in curly braces inside an attribute value on a literal result element, so class="{$cssClass}" is correct. Declaring a parameter is necessary for passing the date, but it is not one of the two constructs needed to meet the stated fallback and template requirements. Disable-output-escaping does not handle missing functions and is discouraged. Placing xsl:attribute after apply-templates does not set the attribute on the element since the element start tag has been written by then.
-
9 Question 9 Order list XML Schema
A finance team maintains a schema in namespace urn:example:ledger that must reference a type defined in urn:example:currency. The schema file is part of a build pipeline that runs on a clean checkout with no network access. The build must validate ledger documents against the combined schemas. Arrange the steps in the correct order.
Drag the steps into the correct order, or use the arrows.
- Confirm that the currency schema declares targetNamespace urn:example:currency
- Add an xsd:import element for urn:example:currency with a relative schemaLocation before any top-level declarations in the ledger schema
- Validate sample ledger documents with the combined schema set in the build pipeline
- Reference the currency type by its prefixed QName in the ledger element declarations
- Copy the currency type definitions into the ledger schema file to avoid external file dependencies
Correct Answer:- Add an xsd:import element for urn:example:currency with a relative schemaLocation before any top-level declarations in the ledger schema
- Confirm that the currency schema declares targetNamespace urn:example:currency
- Reference the currency type by its prefixed QName in the ledger element declarations
- Copy the currency type definitions into the ledger schema file to avoid external file dependencies
- Validate sample ledger documents with the combined schema set in the build pipeline
ExplanationThe imported schema's targetNamespace must match the namespace named in the import, so checking it comes first. The import element with a local schemaLocation must then be declared before other top-level components, which the schema rules require. Only after the import is in place can the QName reference to the currency type resolve. Copying the definitions avoids the dependency but breaks the reuse the team needs and is not a step in the sequence they must follow. Validation of documents comes last, once the schema set is complete.
-
10 Question 10 Order list DOM / SAX
A data team must build an XML document in memory using DOM Level 2 Core in Java, then add a new order element with a namespace-qualified child and move an existing node from one parent to another before serialization. The output must not contain duplicated nodes. Arrange the steps in the order they must be performed.
Drag the steps into the correct order, or use the arrows.
- Create the new element with createElementNS using the namespace URI and qualified name
- Serialize the document with a Transformer
- Call appendChild on the destination parent with the detached node
- Create the document using the DocumentBuilder obtained from a namespace-aware DocumentBuilderFactory
- Append the new element to the parent node obtained from the document
- Call removeChild on the original parent to detach the node before inserting it elsewhere
Correct Answer:- Create the document using the DocumentBuilder obtained from a namespace-aware DocumentBuilderFactory
- Create the new element with createElementNS using the namespace URI and qualified name
- Append the new element to the parent node obtained from the document
- Call removeChild on the original parent to detach the node before inserting it elsewhere
- Call appendChild on the destination parent with the detached node
- Serialize the document with a Transformer
ExplanationA node must belong to the document before it can be created and placed, so the document is built first using a namespace-aware factory. Elements are created with createElementNS to keep namespaces correct before being attached. A DOM node can only be in one place, so it is detached from its original parent before being appended to the destination, which prevents duplication. The new element is appended to the tree, and serialization is the last step once the tree is complete. Putting appendChild before removeChild would fail or leave the node in the wrong place.
-
11 Question 11 Drag and drop XML Processing System Design Technology
A procurement platform exchanges XML messages with suppliers over SOAP and publishes machine-readable service contracts. Its architects must map each requirement to the specification that defines the relevant behaviour. Match each requirement to the correct specification.
Drag each item onto its matching target. On a phone: tap an item, then tap a target.
Define the envelope and header structure used to carry messages between the platform and suppliersDescribe the operations, message types and endpoint bindings offered by the supplier serviceProduce a byte-stable form of an XML document so that its digital signature can be verified after re-serializationEncrypt a selected element of a message while leaving the rest of the document in clear textCanonical XMLXML EncryptionSOAPXML SchemaXSLTWSDLCorrect Answer:- Describe the operations, message types and endpoint bindings offered by the supplier service → WSDL
- Define the envelope and header structure used to carry messages between the platform and suppliers → SOAP
- Produce a byte-stable form of an XML document so that its digital signature can be verified after re-serialization → Canonical XML
- Encrypt a selected element of a message while leaving the rest of the document in clear text → XML Encryption
ExplanationWSDL is the description language that defines operations, messages and bindings for a service, while SOAP defines the envelope and processing model for messages. Canonical XML specifies the normalization that makes signature digests stable across re-serialization. XML Encryption is the specification for encrypting content, including selected elements. XSLT transforms documents and XML Schema defines document structure, so neither addresses the listed requirements.
-
12 Question 12 Dropdown DOM / SAX
A developer writes Java code for a DOM-based configuration loader. The loader must read a value from an element that uses the namespace urn:example:cfg and must set a DOM feature so that whitespace-only text nodes are removed before the tree is traversed. Complete the code fragment by selecting the correct value for each blank.
Choose the correct value for each blank.
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); f.setNamespaceAware(); f.setIgnoringElementContentWhitespace(); Element e = doc.getElementsByTagNameNS("urn:example:cfg", "timeout").item(0);Correct Answer:DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); f.setNamespaceAware(true); f.setIgnoringElementContentWhitespace(true); Element e = doc.getElementsByTagNameNS("urn:example:cfg", "timeout").item(0);
ExplanationgetElementsByTagNameNS only matches correctly when the factory is namespace-aware, so setNamespaceAware must be true. Ignoring element content whitespace removes whitespace-only text nodes in elements whose content model is element-only, and setting it to true achieves the stated removal, though it only takes effect when a DTD or schema defines element content. Setting either value to false would leave the namespace matching or whitespace handling incorrect for the scenario.
-
13 Question 13 Single choice XML Processing System Design Technology
A hospital integrates an XML-based referral system with a legacy relational database. Referral documents are stored in a table column of type XML, and a nightly job must query referral dates inside those documents while preserving the document structure. The database team wants the query to use the XML data type's native XPath functions rather than extracting text in application code. The application is limited to standard SQL access and cannot use vendor-specific stored procedures. Which approach best meets these requirements?
Correct Answer: CExplanationAn XML column lets the database index and query document content with XPath while keeping the structure intact, and standard SQL access is sufficient when the query function is part of the SQL/XML support the platform exposes. A CLOB stored and filtered in application code forces full extraction and fails the requirement to query inside the database. Normalizing into tables loses document structure, which the team wants to keep. A VARCHAR with LIKE is fragile, cannot evaluate element paths, and produces false matches on any text with the same characters.
-
14 Question 14 Single choice Utilizing XML
A logistics firm is redesigning its sample system for shipment tracking. Requirements include generating shipment documents from a template, validating them against an XML Schema, and analysing incoming status updates in a streaming fashion. The solution must limit the number of components so that each documented technique serves exactly one purpose: DOM for creating documents, SAX for streaming analysis, and XSLT for generating output documents. A junior developer proposes using XSLT to parse incoming status updates into a DOM tree before analysis, to simplify the code. What is the most appropriate response?
Correct Answer: AExplanationThe requirement is streaming analysis of status updates, and SAX is the technique the design assigns to that purpose because it reports events without constructing a tree. Routing analysis through XSLT and a DOM tree contradicts the defined role of each technique and adds memory use the team wants to avoid. Replacing DOM for document creation with XSLT changes a stated role and does not address the streaming need. Schema validation checks conformance rather than extracting data, so it cannot replace analysis.
-
15 Question 15 Single choice DOM / SAX
A government records office processes large XML archives with a SAX-based Java reader. The reader must not read the entire archive into memory, and it must correctly report the namespace URI and local name of each element for routing. The current code uses the startElement callback and reads the qName parameter for routing, but records in the default namespace are being routed incorrectly after a nested element redeclares the default namespace. The fix must keep the streaming design. Which change is correct?
Correct Answer: DExplanationIn SAX2 with namespace processing on, startElement provides the namespace URI and local name, which the parser has already resolved against the in-scope declarations, so routing on those fields is correct even after a default namespace is redeclared. The qName parameter contains the prefixed or unprefixed lexical name, which does not reflect the resolved namespace. Switching to DOM abandons the streaming requirement. The namespace-prefixes feature controls whether xmlns attributes are reported and does not change qName into a URI. A global map of all declarations cannot track which scope is active at a given point and does not fix routing.
-
16 Question 16 Single choice XSLT
A bank generates monthly statements by transforming customer XML with an XSLT 1.0 stylesheet. Account numbers must be masked in the output so that only the last four digits appear, and the transform must be applied to thousands of records per run with a strict performance budget. The developer proposes writing a recursive named template to build the masked string one character at a time. Which alternative best meets the requirement with the lowest processing cost?
Correct Answer: CExplanationXSLT 1.0 provides substring, and computing the start position from string-length lets a single expression return the final four characters, which avoids the recursion cost the developer proposed. Iterating over every character per record increases work across thousands of records. A second pass doubles the work and cannot selectively keep the last four digits with translate. Moving masking to the browser pushes sensitive data to an untrusted layer and does not meet the statement generation requirement.
These are 16 of the 80 questions in the full I10-002 pack.
Get All 80 QuestionsGet all 80 questions & answers
Full access options for XML I10-002
Self-study
PDF Version
- 80 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 80 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 80 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the I10-002 Exam (XML Master Professional Application Developer) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.