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 » Getting XML attribute value

Post new topic  Reply to topic
 Getting XML attribute value « View previous topic :: View next topic » 
Author Message
kalva7
PostPosted: Tue Oct 19, 2004 9:36 pm    Post subject: Getting XML attribute value Reply with quote

Novice

Joined: 18 Sep 2003
Posts: 21
Location: Pune,India

Hi,

I have one message flow with incoming XML like this.

<employee id="100">
.........
</employee>


iam trying to get the value of attribute with the follwing esql statements.

Code:
set id=InputRoot.XML.employee.(XML.Attribute)id;

  Set "OutputRoot"."XML"."EmpData"=InputRoot.XML.employee.(XML.Attribute)id;
In case of first statement variable Id contains the value of attribute correctly.
In case of sencond statement Message is generated withour any value means EmpData is empty, but when i use the following statement XML is generated.

Code:
Set "OutputRoot"."XML"."EmpData"=FIELDVALUE(InputRoot.XML.employee.(XML.Attribute)id;


Can any one tell me what the reason is??

Cheers,
Chandra
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
contactop
PostPosted: Fri Oct 22, 2004 7:07 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jun 2003
Posts: 50

Use a function, sometimes it doesnot work, so u have to put it in a variable as u have done. but this way also works.

Set "OutputRoot"."XML"."EmpData"=TRIM(InputRoot.XML.employee.(XML.Attribute)id);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Getting XML attribute value
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.