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 » How to Convert XMLNSC Object To Clob

Post new topic  Reply to topic
 How to Convert XMLNSC Object To Clob « View previous topic :: View next topic » 
Author Message
Animesh
PostPosted: Mon Sep 19, 2016 11:07 pm    Post subject: How to Convert XMLNSC Object To Clob Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Sep 20, 2016 12:50 am    Post subject: Reply with quote

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
View user's profile Send private message
timber
PostPosted: Tue Sep 20, 2016 3:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1282

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
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 20, 2016 4:04 am    Post subject: Reply with quote

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
View user's profile Send private message
Animesh
PostPosted: Tue Sep 20, 2016 5:36 am    Post subject: Re Reply with quote

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
View user's profile Send private message
timber
PostPosted: Tue Sep 20, 2016 7:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1282

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
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 » How to Convert XMLNSC Object To Clob
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.