IBM Support

"XMLParser: Could not find type to assign XML data." when using Native XML type tree

Technote (FAQ)


Why is the XML type tree (Native or Xerces) now producing error "XMLParser: Could not find type to assign XML data."?


There was a defect in the code (APAR PI54104) where the Native and Xerces XML parser would ignore the inability to map XML prolog elements to a field. The XML prolog data would be lost to the user, causing issues with the WTX PACKAGE() function, issues with copying data and data conversion issues if the encoding was not UTF-8.


Now when using Native Schema or Xerces type tree if WTX cannot map XML prolog elements to type tree element we will get a parser error:

"XMLParser: Could not find type to assign XML data."

To correct the parser error:

1. Remove XML header (<?xml version="1.0" encoding="UTF-8"?>) from the data.


2. Change in the native schema input card's "Type" from "? global XSD" to just "XSD" or change in Xerces type tree input card's "Type" from "? Doc XSD" to just "Doc XSD"
This only needs to done for the main native schema input card.


3. If you cannot correct the main input card of an existing map to use the root of the document, you can avoid the parser error by setting the DTX_XML_HDR_NOERROR environment variable to TRUE. The environment variable prevents the parser error, but mapping is still affected if the entire document is not available for processing. For example, the PACKAGE() function returns truncated information, and the encoding element is not set, so the default UTF-8 encoding is used. (Note and and earlier: You may need to apply maintenance for this option to function.)

Document information

More support for: Transformation Extender
Core Engine

Software version:,, 9.0

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows, z/OS

Reference #: 1973455

Modified date: 17 May 2016