Author |
Message
|
Animesh |
Posted: Mon Sep 19, 2016 11:07 pm Post subject: How to Convert XMLNSC Object To Clob |
|
|
Novice
Joined: 13 Sep 2016 Posts: 11
|
Can anyone please suggest how to convert XMLNSC MbElement object to Clob data Type .I am a begginer to this technology. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Sep 20, 2016 12:50 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Can a moderator please move this to the Broker forum. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
timber |
Posted: Tue Sep 20, 2016 3:38 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Happy to help, but we prefer it if you first explain what you have read/tried. Then we can fill in the gaps. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 20, 2016 4:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Do you need the value of the particular element? Or a CLOB representation of the element and all of it's children? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Animesh |
Posted: Tue Sep 20, 2016 5:36 am Post subject: Re |
|
|
Novice
Joined: 13 Sep 2016 Posts: 11
|
I got the solution If there is any other way please guide me for the easiest way to do it.
Code is
Conversion from XMLNSC to CLOB:
MbElement inRoot = inMessage.getRootElement();
MbElement blob = inRoot.getLastChild();
MbElement blobData = blob.getLastChild().getNextSibling();
byte[] dataByteArray = (byte[])(blobData.getValue());
String dataString = new String(dataByteArray); |
|
Back to top |
|
 |
timber |
Posted: Tue Sep 20, 2016 7:23 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
No, that's not the correct way to do it ( whatever you are trying to do). Please supply an example of the XML data that you are trying to process, and the result that you want to get.
Also, please use the code formatting button when you post code or XML to this forum. It makes your posts a lot easier to read, and you are more likely to get help if you keep us happy  |
|
Back to top |
|
 |
|