|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Checking if an XML tag is not present with ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
AlexeiSkate |
Posted: Fri Jul 05, 2002 11:47 am Post subject: Checking if an XML tag is not present with ESQL |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
Hi,
I'm doing a reply and request msg flow. If the request was successful, then the reply XML message is the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<CashReceiptFormQuery>
<Query>
<QueryOutput>
<QueryStatementResponse>
<QueryStatementResponseRow> <documentNumber>0005140002</documentNumber> <uniqueIdentity>&3303&1609&CR&0005140002&</uniqueIdentity>
</QueryStatementResponseRow>
</QueryStatementResponse>
</QueryOutput>
</Query>
</CashReceiptFormQuery>
If the request was not successful, then the reply XML message is the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<CashReceiptFormQuery>
<Query>
<QueryOutput>
<QueryStatementResponse/>
</QueryOutput>
</Query>
</CashReceiptFormQuery>
I want to implement a filter node with the following ESQL:
If Root.XML.CashReceiptFormQuery.Query.QueryOutput.QueryStatementResponse.QueryStatementResponseRow IS NULL
THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
But the ESQL seems to always return TRUE, regardless of the reply message. Is there a correct way to check if an XML tag exist or not using ESQL ?
thanks,
Alex |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 05, 2002 12:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Alex,
Try changing your ESQL to :
Code: |
If (Body.(XML.Element)CashReceiptFormQuery.Query.QueryOutput.QueryStatementResponse.QueryStatementResponseRow IS NULL)
THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|