This error can often be corrected by ignoring the namespaces
. This can be completed by going to XML Handler -> Properties -> Code generation and checking the Reader Ignores Namespaces option.
XML Thunder is adding the “n:” because the element MaterialList has a namespace. The “n:” is a namespace prefix. A namespace prefix is a way to give a shorter version of the namespace name. Namespace names are usually very long so prefixes are used. When shown “n:MaterialList”, the full name is really “MaterialDataInterface:MaterialList”.
The prefix can be anything. XML Thunder uses “n:” by default and can be changed.
The namespace for MaterialList is coming from the schema. XML Thunder is pulling the namespace from the schema and putting it in the Handler Design – using a namespace prefix of “n:”.
If “n:” is not wanted in the XML Thunder handler design, it can be changed by going to Tools -> Defaults Properties -> XML Rules -> Schema and uncheck “import XML namespace”. When this option is checked, XT will not read in the namespaces from the schema. The Handler Design will need to be recreated after changing this option however, an existing handler is not changed.
The “Reader Ignore Namespaces” option will still need to be turned on because the document being read has a namespace declaration in it. It has a “default” namespace defined at the very beginning of the XML document. This means that all elements in the document have this namespace. Turning the ignore namespace option on will allow users to read the document.
Here is the setting to stop XT from reading in namespaces from the schema.
Users need to be careful turning this option on for Writers. If this option is used, any XML documents created (Writers) will not have namespaces. This could be a problem if the additional users need or want the namespaces. If creating a Writer with this schema and namespaces are required then the 'elementFormDefault' should be changed to "Qualified".
If problems continue please contact Canam Software at email@example.com.