Author |
Message
|
satya22777 |
Posted: Mon Feb 05, 2007 2:52 pm Post subject: XML Attributes setting problem |
|
|
Apprentice
Joined: 03 Apr 2006 Posts: 31
|
Hi all,
I am working on WBIMB 5.0 fixpack5.
Here I am trying to set the attributes in the parent elemet. I tried in so many ways, but the fields are creating as child elements but not as attributes. Does any body help me.
for example :
My expectation
<A abc=attValue>
</A>
But we are getting it as:
<A>
<abc>attValue</abc>
</A>
thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 05, 2007 2:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Try something like
SET A.(XML.Attr)abc=attValue;
And browse the site. There is some info in the infocenter as well.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
satya22777 |
Posted: Mon Feb 05, 2007 3:14 pm Post subject: |
|
|
Apprentice
Joined: 03 Apr 2006 Posts: 31
|
Hi,
I have tried the option specified by you.I am getting it as child element instead of attribute. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Feb 05, 2007 3:37 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Which domain are you using? |
|
Back to top |
|
 |
sarat |
Posted: Mon Feb 05, 2007 9:14 pm Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
Hi satya,
Quote: |
SET A.(XML.Attribute)abc = 'attValue'; |
Try this...It should work....if not paste the code wat ur using!! _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
satya22777 |
Posted: Tue Feb 06, 2007 6:06 am Post subject: |
|
|
Apprentice
Joined: 03 Apr 2006 Posts: 31
|
hi kimbert,
We are using MRM domain. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 06, 2007 3:28 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
We are using MRM domain |
I thought so. I know what the problem is. The message tree which you are trying to output does not match your message definition. Please check the following:
-The XML physical format property 'Root Tag Name' should be set to the empty string ( it defaults to 'MRM' in v5 ).
- The name and namespace of each element in the message definition must match the corresponding element in your message tree.
And please note ( all posters on this thread ): you cannot use (XML.Attribute) with the MRM domain. It is a correlation name for the XML and XMLNS domains only. |
|
Back to top |
|
 |
sarat |
Posted: Wed Feb 07, 2007 10:24 pm Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
hi,
kimbert wrote
Quote: |
And please note ( all posters on this thread ): you cannot use (XML.Attribute) with the MRM domain. It is a correlation name for the XML and XMLNS domains only. |
agreed!! But i donn know why u specified this? does any body suggested him to do that in MRM domain?
satya wroe in his first post:
Quote: |
for example :
My expectation
<A abc=attValue>
</A>
But we are getting it as:
<A>
<abc>attValue</abc>
</A> |
we donn know the domain what he's using.
So can we use like this in MRM domain?
Code: |
SET OutputRoot.MRM.A.abc = 'attValue'; |
bcoz.....
Quote: |
When an MRM message is parsed into a logical tree, attributes and the data that they contain are created as name-value pairs in the same way that MRM elements are. This means that the ESQL that you code to interrogate and update the data held in attributes refers to the attributes in a similar manner. |
please let me if i'm wrong!!! _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 08, 2007 4:43 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi sarat,
Quote: |
So can we use like this in MRM domain? |
Yes - your snippet of ESQL would be correct. |
|
Back to top |
|
 |
|