ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Checking if an XML tag is not present with ESQL

Post new topic  Reply to topic
 Checking if an XML tag is not present with ESQL « View previous topic :: View next topic » 
Author Message
AlexeiSkate
PostPosted: Fri Jul 05, 2002 11:47 am    Post subject: Checking if an XML tag is not present with ESQL Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Fri Jul 05, 2002 12:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Checking if an XML tag is not present with ESQL
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.