Skip to Content
0
Nov 14, 2019 at 06:11 PM

XML to XSD type complex : how to map text

146 Views Last edit Dec 04, 2019 at 09:20 PM 2 rev

Hello all,

I'm currently facing an issue while trying to convert XML to XSD then use BODS to map the XSD to a datasource.

My issue is for an element type complex. I succed to run the BODS job but some information are missing.

In the XML, <PARA> could contain text or attribute or element. I succed to retrieve in the datasource the element or attribute but not the text.

Please find below the exemple : XML schema

<L1ITEM>

<PARA>Main Information</PARA>

<PARA> <REFEXT REFCLAS="1" REFLOC="" REFMAN="ABC"/> </PARA>

<PARA> <REFINT REFCLAS="1" REFID="AAAA" REFTYPE="TASK" WP6SourceId="1" href="XXX_AAA_EEE" title="Complementary inspection">Additional Operation</REFINT> </PARA>

</L1ITEM>

XSD schema

<xs:element name="PARA">

<xs:complexType mixed="true">

<xs:choice minOccurs="0" maxOccurs="unbounded">

<xs:element ref="REFEXT"/>

<xs:element ref="REFINT"/>

</xs:choice>

<xs:attribute name="CHANGEMARK" type="xs:integer"/>

<xs:attribute name="CHANGETYPE" type="xs:NCName"/>

</xs:complexType>

</xs:element>

Job well run but text "Main Information" cannot be retrieve in the xml pipeline (or later in the datasource).

the XML schema cannot be modified.

Do you have any idea to solve this issue?

Thanks for your help.