Salesforce

DbXmlExist Example (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

DbXmlExist Example (Magic xpa 3.x)

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="A">

<xs:complexType>

<xs:sequence>

<xs:element name="R" type="RType" minOccurs="0"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:complexType name="RType">

<xs:attribute name="ID" type="xs:int" />

</xs:complexType>

</xs:schema>

Given that the XML schema above is loaded into data source #1, and a view is defined on element 'A\R', the following expressions apply:

1. For a Blob variable A containing:

<A>

</A>

DbXmlExist ('1'DSOURCE, A) will return a False value, since element A\R does not exist.

2. For a Blob variable A containing:

<A>

<R ID="1"/>

</A>

DbXmlExist ('1'DSOURCE, A) will return a True value, since element A\R exists.

Reference
Attachment 
Attachment