Author |
Message
|
pvsr |
Posted: Tue May 07, 2013 2:06 am Post subject: how to delete duplicate xml tag <?xml version='1.0' ?> |
|
|
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 |
|
 |
mqsiuser |
Posted: Tue May 07, 2013 2:44 am Post subject: Re: how to delete duplicate xml tag <?xml version='1.0' ? |
|
|
 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 |
|
 |
kimbert |
Posted: Tue May 07, 2013 3:02 am Post subject: |
|
|
 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 |
|
 |
adubya |
Posted: Tue May 07, 2013 3:55 am Post subject: |
|
|
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 |
|
 |
pvsr |
Posted: Tue May 07, 2013 5:40 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Tue May 07, 2013 5:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You need to change the one that's making the second one appear. |
|
Back to top |
|
 |
pvsr |
Posted: Tue May 07, 2013 7:05 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue May 07, 2013 7:28 am Post subject: |
|
|
 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 |
|
 |
pvsr |
Posted: Tue May 07, 2013 7:56 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Tue May 07, 2013 8:03 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue May 07, 2013 8:07 am Post subject: |
|
|
 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 |
|
 |
pvsr |
Posted: Tue May 07, 2013 8:10 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue May 07, 2013 8:58 am Post subject: |
|
|
 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 |
|
 |
kash3338 |
Posted: Wed May 08, 2013 4:48 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Wed May 08, 2013 5:23 am Post subject: |
|
|
 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 |
|
 |
|