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 » XML to text conversion

Post new topic  Reply to topic
 XML to text conversion « View previous topic :: View next topic » 
Author Message
machinist
PostPosted: Tue Sep 06, 2016 11:45 pm    Post subject: XML to text conversion Reply with quote

Novice

Joined: 17 Feb 2016
Posts: 15
Location: India

Hi All,


I need to convert incoming XML message to text message
Can anyone help me out,how can i do this ?


Last edited by machinist on Wed Sep 07, 2016 1:25 am; edited 1 time in total
Back to top
View user's profile Send private message
mpong
PostPosted: Wed Sep 07, 2016 12:00 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Search for xml cdata
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 07, 2016 3:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What is a text message?

A message that is a text representation of the XML document? IIB handles that without any code on your part?

A message in a specific format that does not resemble the XML document?

You can use any of the IIB transformation nodes to achieve this. But you need to build a model of the text message.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
adubya
PostPosted: Wed Sep 07, 2016 4:09 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

ASBITSTREAM may help you out if you want to generate a text string representation of an incoming XML structure.

But it's not clear what you're after.
_________________
Independent Middleware Consultant
andy@knownentity.com
Back to top
View user's profile Send private message Send e-mail
machinist
PostPosted: Thu Sep 08, 2016 2:44 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2016
Posts: 15
Location: India

i am trying by using DFDL

1.i have created message model for output text message.

2.then i have mapped input xml elements with output text message model

and now i am testing it but its heavy and it takes time.


i need easier method like esql code which can convert XML to text.
output text file should be like this

010100100C 70117731190550866800000000 201505180591050 24103000020401346644443287 000000000000400000 20150518000000000000000000
L000004 000000000000404660 000000000000000000

fixed length.
Back to top
View user's profile Send private message
timber
PostPosted: Thu Sep 08, 2016 3:13 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
i am trying by using DFDL...and now i am testing it but its heavy and it takes time.
Fair enough. Your output format looks simple, so you expected the format conversion to be a simple task.
But data formats are not simple. DFDL seems 'heavy' because it makes you think about all of the stuff that you might forget if you did the job using ESQL (or Java, or any other custom code). Like padding, left/right justification, number and data formats etc.
Back to top
View user's profile Send private message
machinist
PostPosted: Sun Sep 11, 2016 9:51 pm    Post subject: Reply with quote

Novice

Joined: 17 Feb 2016
Posts: 15
Location: India

@timber can u please provide esql code for conversion xml to text conversion

Back to top
View user's profile Send private message
timber
PostPosted: Mon Sep 12, 2016 12:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Why are you asking me? I would never use ESQL for this task. DFDL is the correct solution. Data format conversion is not as simple as it looks, and a model-based solution is almost always better than a code-based solution.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Sep 12, 2016 2:24 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.

machinist wrote:


and now i am testing it but its heavy and it takes time.


Life takes time and there is never enough hours in the day.

If you think testing this is 'heavy' then think what it would take to test flight critical software.

Stick at it and you will get there and in doing so learn a lot of skils to take you forward.

I don't think I would be alone in saying that testing is more preferable to ... say writing support documentation.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML to text conversion
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.