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 » xml attr becomes element after using environment tree

Post new topic  Reply to topic
 xml attr becomes element after using environment tree « View previous topic :: View next topic » 
Author Message
Yanghui
PostPosted: Mon May 10, 2004 1:00 am    Post subject: xml attr becomes element after using environment tree Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Hi, there,

I am using environment tree to store incoming xml because I need to keep most of xml structure for output and there are several times domain change in msgflow. The problem I am having now is that all attributes in the incoming xml have been changed to normal tags of their parent elements. The ESQL I am using is

SET OutputRoot.Properties.MessageDomain = 'XML';
SET OutputRoot.XML = NULL;
CREATE Field OutputRoot.XML.MYMESSAGE;
SET OutputRoot.XML.MYMESSAGE = Environment.Variables.OriginInputMsg.MYMESSAGE;

Am I missing something here? How can I keep atrributes as where they are?

Many thanks for your input in advance.

Regards

-Yanghui
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon May 10, 2004 2:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The Environment tree doesn't support XML attributes by default. It doesn't have any parsers associated with it, so it can't tell how to handle different types of logical elements.

You might be able to get around this by creating a field in Environment that has an XML parser associated (CREATE FIELD ... PARSE ...).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Yanghui
PostPosted: Mon May 10, 2004 3:53 am    Post subject: Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Hi,

Thanks for your reply but I don't understand your get-around. Should I use different XML parser? Is the parser available with the product? Do you mind to make it clearer? Do you have ESQL for this?

Many thanks again

Regards

-Yanghui
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon May 10, 2004 4:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm saying that rather than just copying stuff into Environment using set, you should first use the Create Field statement and include the Parse option to create for instance your root XMl tag in the Environment tree.

Then, maybe, you will be able to store your attributes and retrieve them again as attributes.

But generally, the Environment tree doesn't support attributes.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JLRowe
PostPosted: Mon May 10, 2004 6:46 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

You can create the environment tree with an owning parser, using the CREATE FIELD with DOMAIN clause.

(e.g.)

CREATE LASTCHILD OF Environment DOMAIN 'XML' NAME 'TempTree';
SET Environment.TempTree = <<Saved Message Tree>>;

(later on...)

SET OutputRoot.XML = Environment.TempTree.*[>];

This should preserve all the XML parser specific types.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » xml attr becomes element after using environment tree
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.