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 » Parsing XML data from Oracle CLOB-field

Post new topic  Reply to topic
 Parsing XML data from Oracle CLOB-field « View previous topic :: View next topic » 
Author Message
the m
PostPosted: Wed Dec 02, 2009 7:18 am    Post subject: Parsing XML data from Oracle CLOB-field Reply with quote

Newbie

Joined: 17 Nov 2009
Posts: 6

Hi,

I'm a newbie so try to bear with me I would like to know how can I parse XML message which is stored to Oracle DB and into CLOB type field. I have already retrieved the XML data from the CLOB field and set the query result to the ROW data type variable in ESQL. I can also see from the trace that the data retrieved from the CLOB field is not shown in tree structure in Message Broker and that is the problem. I would need to navigate through the tree structure in order to parse only couple of elements from the XML and pass them forward.

So is there any way to read the XML data from the CLOB field so that the retrieved data would be in tree structure in Message Broker?
Back to top
View user's profile Send private message
mgk
PostPosted: Wed Dec 02, 2009 7:44 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Yes, look up the CREATE statement, specifically the PARSE clause...

Kind Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
the m
PostPosted: Mon Dec 07, 2009 6:04 am    Post subject: Reply with quote

Newbie

Joined: 17 Nov 2009
Posts: 6

Well, I'm still facing problems with this one. I managed to fetch xml-data from the Oracle's CLOB type field with following ESQL code:

Code:
SET Environment.Variables.PGData = THE(SELECT T.PGML_DATA FROM Database.PG_DATA AS T);


After the query I'll try to pass the query result to the Reset Content Descriptor node:

Code:
SET OutputRoot.BLOB.BLOB = CAST(Environment.Variables.PGData[1] AS BLOB CCSID 1252);


The result from above is NULL:

Code:
2009-12-07 15:46:13.764139    61   UserTrace   BIP2539I: Node 'XMLSelect.Compute': Evaluating expression ''Environment.Variables.PGData[1]'' at ('.XMLSelect_Compute.Main', '10.35'). This resolved to ''Environment.Variables.PGData[1]''. The result was ''NULL''.


I also tried to use CREATE statement as mgk suggested but that also resulted an error because of the NULL value. Can somebody figure out what's the problem with my code?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Dec 07, 2009 12:16 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I suggest that you use the visual debugger to look at the environment tree after that first SET statement. Maybe the data is there, but your path is incorrect.
Alternatively, split the Compute node into two parts and put a Trace node between them with pattern '$Environment.Variables' - but that's more work.
Back to top
View user's profile Send private message
the m
PostPosted: Tue Dec 08, 2009 6:33 am    Post subject: Reply with quote

Newbie

Joined: 17 Nov 2009
Posts: 6

kimbert wrote:
I suggest that you use the visual debugger to look at the environment tree after that first SET statement. Maybe the data is there, but your path is incorrect.
Alternatively, split the Compute node into two parts and put a Trace node between them with pattern '$Environment.Variables' - but that's more work.


Thanks kimbert, problem solved with trace node. Data was there but the path was incorrect
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 » Parsing XML data from Oracle CLOB-field
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.