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 attributes lost

Post new topic  Reply to topic
 XML attributes lost « View previous topic :: View next topic » 
Author Message
shalabh1976
PostPosted: Tue Dec 20, 2005 2:00 am    Post subject: XML attributes lost Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Hi,
This is in reference to my earlier post: http://www.mqseries.net/phpBB2/viewtopic.php?t=26054
Consider the following XML:
<root>
<Child Name = "1" Type = "Male">
<Grandchild Name = "2" Type "Male">
<Grandgrandchild Name = "3" Type = "Male">x</Grandgrandchild>
<Grandgrandchild Name = "3" Type = "Female">y</Grandgrandchild>
</Grandchild>
<Grandchild Name = "2" Type "Female">
<Grandgrandchild Name = "3" Type = "Male">x</Grandgrandchild>
<Grandgrandchild Name = "3" Type = "Female">y</Grandgrandchild>
</Grandchild>
</Child>
<Child Name = "1" Type = "Female">
<Grandchild Name = "2" Type "Male">
<Grandgrandchild Name = "3" Type = "Male">x</Grandgrandchild>
<Grandgrandchild Name = "3" Type = "Female">y</Grandgrandchild>
</Grandchild>
<Grandchild Name = "2" Type "Female">
<Grandgrandchild Name = "3" Type = "Male">x</Grandgrandchild>
<Grandgrandchild Name = "3" Type = "Female">y</Grandgrandchild>
</Grandchild>
</Child>
</root>

I was completely unable to refer to any grandgrandchild from the root using a single XML statement.
So as suggested by elvis_gn, I used Select.
My select was of the form:
Code:
SET Environment.Variables[Counter].Var = (SELECT  A.Child FROM InputRoot.XML.root AS A where A.Child.(XML.Attribute)Type = 'Male');

This resulted in the correct Child being selected as I saw from the filetrace.
However the values of the Grandgrandchild appeared as x & y but the attribute values of Name and Type were not displayed.
Further selects on Grandchild using thgeir XML attributes showed that the parser was unable to Navigate path because they did not exist( from mqsichangetrace).
I need these attribute values to select the correct grandgrandchild.
How do I do this ?
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
elvis_gn
PostPosted: Tue Dec 20, 2005 2:30 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi ,

I see you have migrated from one post to another

Check this out. It should answer your question...Concentrate on Environment and Parser.

http://www.mqseries.net/phpBB2/viewtopic.php?t=19429&highlight=asbitstream+environment

Regards.
Back to top
View user's profile Send private message Send e-mail
shalabh1976
PostPosted: Tue Dec 20, 2005 2:48 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Elvis:
Results look promising:
The key was :
Code:
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';

I come back if I get stuck.
The reason for using a new post was that the old post dealt with a different issue. Anyway my new post does refer to the old one and I did give credit to your solution.
I'll get back to my code now.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
elvis_gn
PostPosted: Tue Dec 20, 2005 2:53 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi shalabh1976,

since you gave me credit, I am taking special interest in your posts

kidding, i see that u moved on from the last problem.

Hope you get this one too.

Regards.
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 attributes lost
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.