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 » Escape character in xml message.

Post new topic  Reply to topic
 Escape character in xml message. « View previous topic :: View next topic » 
Author Message
sdewey
PostPosted: Mon Oct 18, 2004 9:34 am    Post subject: Escape character in xml message. Reply with quote

Newbie

Joined: 18 Oct 2004
Posts: 3

I work with a process that receives CSV files and the data is placed between quotation marks. The files are processed by an adapter. While the adapter is processing the files, it removes quotation marks from the data. The record is placed on an input queue. The corresponding message set is configured with the TDS Wire Format Identifier with a comma set as the delimiter and an apostrophe set as the escape character. When the data contains a comma, we place an escape character in front of the comma to maintain the integrity of the file. These files are then sent to a node that converts the file to XML format.

Can anyone tell me how I might be able to mask the escape character for data that contains a comma?
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Oct 18, 2004 1:35 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I dont think you need to escape comma in XML format.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
sdewey
PostPosted: Thu Oct 21, 2004 9:45 am    Post subject: Escape character in xml message. Reply with quote

Newbie

Joined: 18 Oct 2004
Posts: 3

Kirani,

Thanks for your prompt response.

My concern with this issue is related to the data that gets stored in a database. For example, the data is passed to our adapter in the following format: "1T90","285362","1234 Somewhere Rd, Suite 3",...........

When the file is processed by our adapter, it removes the quotation marks. For string type fields, where commas would be allowed, we place the escape character in front of any commas within the quotation marks for that field. When the CSV data is converted to XML, the conversion process ignores the comma with a preceeding apostrophe. For example: 1T90,285362,1234 Somewhere Rd, Suite 3,..... would cause the data for the address to be placed in separate tags.

<OfficeID>1T90</OfficeID>
<OrderNumber>285362</OrderNumber>
<Address>1234 Somewhere Rd</Address>
<Phone>Suite 3</Phone>

When the escape character is applied in the example, the comma is ignored in the address data, but the apostrophe comma combination gets placed in the associated XML tag and gets written to the database.

1T90,285362,1234 Somewhere Rd`, Suite 3,.....

<OfficeID>1T90</OfficeID>
<OrderNumber>285362</OrderNumber>
<Address>1234 Somewhere Rd`, Suite3</Address>
<Phone></Phone>

Unfortunately, the front-end application that supplies the data does not contain any edits. It would be nice if the data was in separate fields, but those are the cards the process has been dealt.

I am not sure if this information sheds any additional light on the topic, but if I need to provide any addtional information I will do so at your request.

Best regards,

Scott Dewey
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 » Escape character in xml message.
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.