|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parsing XML data from Oracle CLOB-field |
« View previous topic :: View next topic » |
Author |
Message
|
the m |
Posted: Wed Dec 02, 2009 7:18 am Post subject: Parsing XML data from Oracle CLOB-field |
|
|
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 |
|
 |
mgk |
Posted: Wed Dec 02, 2009 7:44 am Post subject: |
|
|
 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 |
|
 |
the m |
Posted: Mon Dec 07, 2009 6:04 am Post subject: |
|
|
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 |
|
 |
kimbert |
Posted: Mon Dec 07, 2009 12:16 pm Post subject: |
|
|
 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 |
|
 |
the m |
Posted: Tue Dec 08, 2009 6:33 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|