Skip to main content

Q&A 6

Map elements using AnyType

The XML Schema type anyType allows the content of the element to be anything you want. That is a problem for hale»studio, as it doesn't know which kind of value or structure is expected then. We made this configurable for such cases. However, adapting a hale project for using anyType is a manual process, there is no support in the User Interface.

You need to add customTypeContent to the settings of the XML Schema Reader in the hale project file (XML format, save as .halex to edit).

The following is an example of the schema reader configuration:

<resource action-id="" provider-id="">
<complex-setting name="customTypeContent">
<xsd:typeContentConfig xmlns:xsd="">
<core:list xmlns:core="">
<core:name namespace="">OM_ObservationType</core:name>
<core:name namespace="">result</core:name>
<xsd:typeContent mode="elements">
<core:name namespace="">Quantity</core:name>
<setting name="resourceId">110e79da-ba08-4759-8cea-8102b0850dc0</setting>
<setting name="source">resource1/EF_OF_4.xsd</setting>
<setting name="charset">UTF-8</setting>
<setting name="contentType"></setting>

In the above example the property result of the type ObservationType is configured so that it may contain the element Quantity.