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 » need help on PARSE using XMLNSC

Post new topic  Reply to topic
 need help on PARSE using XMLNSC « View previous topic :: View next topic » 
Author Message
hariwmb
PostPosted: Wed May 23, 2012 7:44 pm    Post subject: need help on PARSE using XMLNSC Reply with quote

Newbie

Joined: 23 May 2012
Posts: 2

iam getting an xml in one of the field in the xml and i need to parse it and need to set it another field in the output message below i the xml iam getting
<CUST_H>&lt;NS1:ZZYCONT_LANGUAGE&gt;DE&lt;/NS1:ZZYCONT_LANGUAGE&gt;&lt;NS1:ZZYMEA&gt;&lt;/NS1:ZZYMEA&gt;&lt;NS1:ZZY_SP_BID_TYP_H&gt;&lt;/NS1:ZZY_SP_BID_TYP_H&gt;&lt;NS1:ZZYNTC&gt;&lt;/NS1:ZZYNTC&gt;&lt;NS1:ZZYCOC&gt;&lt;/NS1:ZZYCOC&gt;&lt;NS1:ZZYRP_MES_H&gt;&lt;/NS1:ZZYRP_MES_H&gt;&lt;NS1:ZZYPROP_NAME&gt;&lt;/NS1:ZZYPROP_NAME&gt;&lt;NS1:ZZYUCS&gt;DL Z&amp;M&lt;/NS1:ZZYUCS&gt;&lt;NS1:ZZYPVI&gt;&lt;/NS1:ZZYPVI&gt;&lt;NS1:ZZYSCI&gt;&lt;/NS1:ZZYSCI&gt;&lt;NS1:ZZYLBR&gt;A030104&lt;/NS1:ZZYLBR&gt;&lt;NS1:ZZLEGAL&gt;&lt;/NS1:ZZLEGAL&gt;&lt;NS1:ZZY_APP_ID&gt;&lt;/NS1:ZZY_APP_ID&gt;</CUST_H>
and im trying it to parse it by using below
DECLARE xmlString CHARACTER inputRef.SapImCpsSourceHeader.CUST_H;
CREATE LASTCHILD OF OutputRoot.XMLNSC.NS1:contract.NS1:customer_h DOMAIN ('XMLNSC') PARSE (xmlString CCSID 1208);
but getting xml parse errors
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 23, 2012 7:55 pm    Post subject: Re: need help on PARSE using XMLNSC Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

hariwmb wrote:
iam getting an xml in one of the field in the xml and i need to parse it and need to set it another field in the output message below i the xml iam getting
Code:
<CUST_H>&lt;NS1:ZZYCONT_LANGUAGE&gt;DE&lt;/NS1:ZZYCONT_LANGUAGE&gt;&lt;NS1:ZZYMEA&gt;&lt;/NS1:ZZYMEA&gt;&lt;NS1:ZZY_SP_BID_TYP_H&gt;&lt;/NS1:ZZY_SP_BID_TYP_H&gt;&lt;NS1:ZZYNTC&gt;&lt;/NS1:ZZYNTC&gt;&lt;NS1:ZZYCOC&gt;&lt;/NS1:ZZYCOC&gt;&lt;NS1:ZZYRP_MES_H&gt;&lt;/NS1:ZZYRP_MES_H&gt;&lt;NS1:ZZYPROP_NAME&gt;&lt;/NS1:ZZYPROP_NAME&gt;&lt;NS1:ZZYUCS&gt;DL Z&amp;M&lt;/NS1:ZZYUCS&gt;&lt;NS1:ZZYPVI&gt;&lt;/NS1:ZZYPVI&gt;&lt;NS1:ZZYSCI&gt;&lt;/NS1:ZZYSCI&gt;&lt;NS1:ZZYLBR&gt;A030104&lt;/NS1:ZZYLBR&gt;&lt;NS1:ZZLEGAL&gt;&lt;/NS1:ZZLEGAL&gt;&lt;NS1:ZZY_APP_ID&gt;&lt;/NS1:ZZY_APP_ID&gt;</CUST_H>

and im trying it to parse it by using below
DECLARE xmlString CHARACTER inputRef.SapImCpsSourceHeader.CUST_H;
CREATE LASTCHILD OF OutputRoot.XMLNSC.NS1:contract.NS1:customer_h DOMAIN ('XMLNSC') PARSE (xmlString CCSID 1208);
but getting xml parse errors


I know it's supposed to work on character, but for purity's sake should you not transform this first into a BLOB and parse the BLOB?.

I would not want any side effect to affect you, due to your definition of the Character variable... , and I'd expect the CCSID, the way you wrote your code, to have been 1200 instead of 1208...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hariwmb
PostPosted: Wed May 23, 2012 8:49 pm    Post subject: Reply with quote

Newbie

Joined: 23 May 2012
Posts: 2

thanks for helping i tried like this
DECLARE messageBlob BLOB CAST(inputRef.SapImCpsSourceHeader.CUSTOMER_H AS BLOB CCSID 1200);
CREATE LASTCHILD OF OutputRoot.XMLNSC.NS1:contract.NS1:customer_h DOMAIN ('XMLNSC') PARSE (messageBlob);
but getting same xml parse errors
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 24, 2012 12:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
getting xml parse errors
How are we supposed to help without knowing what the errors were? In future, please quote the full text of the error message(s).

Quote:
I know it's supposed to work on character, but for purity's sake should you not transform this first into a BLOB and parse the BLOB?.
If you pass a CHARACTER field to the parser then the CCSID must be 1204 ( i.e. UTF-16 with platform endianness ). All CHARACTER data in the message tree is in UTF-16.

Try this:
Code:
CREATE LASTCHILD OF OutputRoot.XMLNSC.NS1:contract.NS1:customer_h DOMAIN ('XMLNSC') PARSE (inputRef.SapImCpsSourceHeader.CUST_H);
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 » need help on PARSE using XMLNSC
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.