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 1, 2  Next
 how to delete duplicate xml tag <?xml version='1.0' ?> « View previous topic :: View next topic » 
Author Message
pvsr
PostPosted: Tue May 07, 2013 2:06 am    Post subject: how to delete duplicate xml tag <?xml version='1.0' ?> Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

Here in output am getting two <?xml version="1.0" encoding="iso-8859-1"?>
<?xml version="1.0" ?>
<Customer></Customer>


So i want only one tag which should show the version.

How to delete the another tag..

Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue May 07, 2013 2:44 am    Post subject: Re: how to delete duplicate xml tag <?xml version='1.0' ? Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

This has been discussed before.

You cannot use the XMLNSC (or any XML parser) (to correct this error).

Use BLOB, a COMPUTE NODE and SUBSTRING or REPLACE (on the BLOB) to remove one of the two.

Then e.g. use a RESET CONTENT DESCRIPTOR (to set to XMLNSC).
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 07, 2013 3:02 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Here in output am getting two <?xml version="1.0" encoding="iso-8859-1"?>
What is producing this output. Your message flow? Or some other application?
Back to top
View user's profile Send private message
adubya
PostPosted: Tue May 07, 2013 3:55 am    Post subject: Reply with quote

Partisan

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

Have you verified that the flow code is not adding a second declaration ?
Back to top
View user's profile Send private message Send e-mail
pvsr
PostPosted: Tue May 07, 2013 5:40 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

where should i check in esql.

i want only the output with only one xml version and encoding

i dont want to use any rcd node in my message flow..

without that how can i get the standard output.

can any one tell me how to delete the second version which was generated in output.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 07, 2013 5:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to change the one that's making the second one appear.
Back to top
View user's profile Send private message
pvsr
PostPosted: Tue May 07, 2013 7:05 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

thats what am asking show me an alternate way.

whether i have to check mqmd or else some other code
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 07, 2013 7:28 am    Post subject: Reply with quote

Grand High Poobah

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

pvsr wrote:
whether i have to check mqmd or else some other code


I think we can rule out the MQMD as the source of the 2nd header.

I think you're also working under the assumption WMB is adding one of the declarations itself. It's not. Something in the user code is adding the 2nd declaration or there are 2 declarations on the original message.

pvsr wrote:
where should i check in esql.


In all of the ESQL that manipulates the message. Pay particular attention to any logic which adds an XML declaration; it may not check to see if there is a declaration before adding one.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pvsr
PostPosted: Tue May 07, 2013 7:56 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

so can you please let me know where should i check

whether it was declared twice or not..

Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 07, 2013 8:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pvsr wrote:
so can you please let me know where should i check

whether it was declared twice or not..



Put a trace node after the input node.

Put a trace node after each node in your flow.

We can't tell you where to check.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 07, 2013 8:07 am    Post subject: Reply with quote

Grand High Poobah

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

pvsr wrote:
so can you please let me know where should i check


In all the ESQL that manipulates the message.

How are we supposed to know what your ESQL looks like or where this activity is likely to be performed?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pvsr
PostPosted: Tue May 07, 2013 8:10 am    Post subject: Reply with quote

Novice

Joined: 06 May 2013
Posts: 12

i mean to ask you is there any other options to declare that xml attribute using mqmd or else with some other functions.

in my esql i didnt find any declaration that was done directly .

please let me know how can i get out of this

Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 07, 2013 8:58 am    Post subject: Reply with quote

Grand High Poobah

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

pvsr wrote:
i mean to ask you is there any other options to declare that xml attribute using mqmd or else with some other functions.


There is no way to create that declaration without using code.

pvsr wrote:
please let me know how can i get out of this


Follow the advice of my most worthy associates and find where the spurious declaration appears. Backtrack to where it is not present, and examine actions between these 2 points.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Wed May 08, 2013 4:48 am    Post subject: Reply with quote

Shaman

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

pvsr wrote:
please let me know how can i get out of this


You can get out of this if you can answer or provide more information on this. As kimbert has already asked,

Where is this message coming from?
What are you doing in your message flow on the message?
Have you put a trace to see where in your flow this duplicate header is being added?

I guess your problem is because of this. You have managed to add the header in your code and hence the duplicates.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed May 08, 2013 5:23 am    Post subject: Reply with quote

Grand High Poobah

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

kash3338 wrote:
I guess your problem is because of this. You have managed to add the header in your code and hence the duplicates.


Good catch. It sounds like there's code resulting from the earlier thread to add a declaration with encoding which either doesn't remove the earlier declaration or tries to add the encoding to the existing declaration & fails.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 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.