Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question XML filter [if element exists or not]

More
15 May 2015 19:53 #1 by TAOUILI
TAOUILI created the topic: XML filter [if element exists or not]
Hi,

I have a XML as source in my mapping, for a choice i have 2 elements like :
<xsd:choice>
<xsd:element name="Air" type="tns:AirType"/>
<xsd:element name="Sea" type="tns:SeaType"/>
</xsd:choice>
for the AirType i have :
<xsd:complexType name="AirType">
<xsd:complexContent>
<xsd:sequence>
<xsd:element name="AirField1" type="xsd:string"/>
<xsd:element name="AIrField2" type="xsd:string"/>
...
and for SeaType i have :
<xsd:complexType name="SeaType">
<xsd:complexContent>
<xsd:sequence>
<xsd:element name="SeaField1" type="xsd:string"/>
<xsd:element name="SeaField2" type="xsd:string"/>
...
My question is, how to test if air exists or sea (AirField1 or SeaField1), I tried to xml\inv\air = (<>) null and sometgings like this but it doesn't work.
FYI: when i'm sure that my xml is sea i can test on SeaField1 = a one particular value but with not null it doesn't work.

Thanks in advance.
More
18 May 2015 15:18 #2 by Thomas BLETON
Thomas BLETON replied the topic: XML filter [if element exists or not]
Hi,
Did you try using "IS NULL" or "IS NOT NULL" ?
I invite you to try it, and open the generated process to understand where the filter takes place.