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 delete duplicate xml tag <?xml version='1.0' ?>

Post new topic  Reply to topic Goto page Previous  1, 2
 how to delete duplicate xml tag <?xml version='1.0' ?> « View previous topic :: View next topic » 
Author Message
pvsr
PostPosted: Thu May 09, 2013 3:57 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

what ever you said is correct .

I have done debugging then i came to know that what ever the code i have written wont work.

i need to make another code which will give me the exact output as i design.

Actually we are using mrm parser. so how can i add my encoding to that xml tag.

previously i have done this.
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
CREATE FIRSTCHILD OF OutputRoot.XMLNSC TYPE XMLNSC.XmlDeclaration;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'iso-8859-1';


So can anyone please let me what is the correct code for mrm domain which is getting xml as output that should add version and encoding in header of the output



[/url]
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu May 09, 2013 4:07 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

pvsr wrote:
Actually we are using mrm parser. so how can i add my encoding to that xml tag.


Why are you using MRM parser to generate a XML message? What is the use of a XMLNSC parser then?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu May 09, 2013 4:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pvsr wrote:
Actually we are using mrm parser. so how can i add my encoding to that xml tag.


Again I'll assume you mean that some other legacy flow is creating the document using the MRM domain otherwise (as others have said) your use of the XMLNSC domain as pointless as the use of the MRM domain for XML.


pvsr wrote:
previously i have done this.
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
CREATE FIRSTCHILD OF OutputRoot.XMLNSC TYPE XMLNSC.XmlDeclaration;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'iso-8859-1';


Now look carefully at what your code is doing. You looking?

pvsr wrote:
So can anyone please let me what is the correct code for mrm domain which is getting xml as output that should add version and encoding in header of the output


Now you ask what is the correct code to add version and encoding to the header, and you know that you get 2 copies of the header (or declaration as it's more properly called).

So look back at your code, then at the results where you get 2 declarations, then at the trace we told you to take where you see the declararation already in the XML as it enters your code, and then ask yourself what that CREATE FIRSTCHILD you've coded is going to do.

Then think. While you're at it, think about what possible connection the MRM domain has to your code. If you come up with a connection, post it here.

And don't double post. If you don't like the answers you're getting here, don't start another thread in the hope of getting better ones.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pvsr
PostPosted: Thu May 09, 2013 5:36 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

sorry for troubling you that we use xml for input parsing.

later when tranformation was done we get output as xml.

So here when am trying to use xmlnsc .
its giving me the double version as mentioned before.

so give me the exact code for the xml declaration.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 09, 2013 5:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pvsr wrote:
so give me the exact code for the xml declaration.


Vitor wrote:
So look back at your code, then at the results where you get 2 declarations, then at the trace we told you to take where you see the declararation already in the XML as it enters your code, and then ask yourself what that CREATE FIRSTCHILD you've coded is going to do.


Anything more clear would require you to send me money and reconsider your choice of profession.
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Thu May 09, 2013 7:38 am; edited 1 time in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 09, 2013 7:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please read this topic carefully: http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/ac67180_.htm

Also, if you have not already done so, please bookmark the info center web site.
Back to top
View user's profile Send private message
pvsr
PostPosted: Fri May 10, 2013 1:20 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

Code:
CREATE PROCEDURE SourceToTarget() BEGIN
         --Form output msg
            --Copy Message Headers      
            CALL CopyMessageHeaders();
            SET OutputRoot.MQMD.Format='MQSTR';
            
            --Get Queue Destination From Future Path Variable in EAI Header      
            IF (InputRoot.MQRFH2.usr.EAIHdr.futrPth) IS NULL OR (InputRoot.MQRFH2.usr.EAIHdr.futrPth = '' ) THEN
               THROW EXCEPTION SEVERITY 3 MESSAGE 1561;
            ELSE
               -- need to set DestinationList from ';' delimited future path
               DECLARE xLocalEnvironment REFERENCE TO OutputLocalEnvironment;
               CALL SetMQDestination(xLocalEnvironment,InputRoot.MQRFH2.usr.EAIHdr.futrPth);
            END IF;
            
            --SET Response Message Properties   
            SET OutputRoot.Properties.Domain = 'MRM';
            SET OutputRoot.Properties.MessageSet = 'APS_MESSAGESET';
            SET OutputRoot.Properties.MessageType = 'Customer_master_APS';
            SET OutputRoot.Properties.MessageFormat ='XML1';
            
            
            SET OutputRoot.XML.(XML.XmlDecl) = ’’;
             -- Set the Encoding within the XML Declaration
            SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'ISO-8859-1';
Back to top
View user's profile Send private message
pvsr
PostPosted: Fri May 10, 2013 1:23 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

this is the code in last i have done that coding..
please let me know where i done wrong...
where i have to change the code or else something
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 10, 2013 4:28 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pvsr wrote:
please let me know where i done wrong...


Well that proves my assumption wrong. You are trying to use the MRM domain to output an XML document. You've been told repeatedly in this thread not to do that and seem either unwilling or unable to understand this is not right.

You've also managed to get the wrong method wrong. To use the MRM domain as this code is trying to, you'd need:

Code:
OutputRoot.MRM....
not
Code:
OutputRoot.XML...


as you've coded.

Earlier in this thread you posted this:

Code:
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
CREATE FIRSTCHILD OF OutputRoot.XMLNSC TYPE XMLNSC.XmlDeclaration;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'iso-8859-1';


where you're correctly using the XMLNSC domain. What made you change this? Have you now decided randomly changing your code until you hit the right combiniation is the way forward?

pvsr wrote:
where i have to change the code or else something


Obviously you have to change the code. If only to change it back from the rubbish you've most recently posted. You then have to find the something else you need to correct which we can't spoon feed you. We can't see your message, we can't see you flow and we can't see all your code. Even if we could, we have day jobs where we're paid to work in the same way this is your day job and you're paid to do it.

You've been given all the advice you need to find and fix the problem. Repeatedly. Now you have to work the problem as you're employed to do and resolve it.

If this is too much for you, you need to think about your career choices.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pvsr
PostPosted: Mon May 13, 2013 1:03 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

thanks for your advice
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » how to delete duplicate xml tag <?xml version='1.0' ?>
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.