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....Parsing....MQSI - solved

Post new topic  Reply to topic
 XML....Parsing....MQSI - solved « View previous topic :: View next topic » 
Author Message
bindu
PostPosted: Thu May 13, 2004 11:57 am    Post subject: XML....Parsing....MQSI - solved Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi,
I am getting request message like

<A _client_version="1.2.14" _process_type="system" >

in compute node i am setting these values to some elements but in out put i am getting attributes instead of child elements.
Can anybody help me regarding this.
Thanx,
Bindu


Last edited by bindu on Fri May 14, 2004 12:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
Missam
PostPosted: Thu May 13, 2004 12:33 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Can you post your code here..?
Back to top
View user's profile Send private message
bindu
PostPosted: Thu May 13, 2004 1:50 pm    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi,

SET OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number"= InputRoot.XML.(XML.attr)"_client_version";

then it comes as a attribute instead of child element for NAME

any suggestions.

Thanx,
Bindu
Back to top
View user's profile Send private message
Missam
PostPosted: Thu May 13, 2004 4:00 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Code:
SET OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number"= InputRoot.XML.(XML.attr)"_client_version";


Your Input
Quote:
<A _client_version="1.2.14" _process_type="system" >


I Hope you are missing Element A

Code:

OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number"= InputRoot.XML.A.(XML.attr)"_client_version";


Can you print your out put XML here...
Back to top
View user's profile Send private message
bindu
PostPosted: Fri May 14, 2004 6:01 am    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi missam,
actuvally i didnt missed the root element....
OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number"= InputRoot.XML.A.(XML.attr)"_client_version";
if i gave like this it comes again as a attribute instead of child element.
Thanx for ur time.
Bindu
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri May 14, 2004 6:09 am    Post subject: Re: XML....Parsing....MQSI Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Code:
OutputRoot.XML."soap:Envelope"."soap:Body"."Name".(XML.Element)"Number"= InputRoot.XML.A.(XML.attr)"_client_version";

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bindu
PostPosted: Fri May 14, 2004 6:23 am    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi,
If i pass like

OutputRoot.XML."soap:Envelope"."soap:Body"."Name".(XML.Element)"Number"= InputRoot.XML.A.(XML.attr)"_client_version";

i got O/p like

<Name>
<Number/>
</Name>

I didnt get the value for that number.Any suggestions.
thanx,
bindu
Back to top
View user's profile Send private message
bindu
PostPosted: Fri May 14, 2004 6:28 am    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Nope i am getting the value for that element
Back to top
View user's profile Send private message
Missam
PostPosted: Fri May 14, 2004 7:31 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Hi bindu

i tried couple of unsuccessful attempts to get your result.

you can alternatively do this

Code:
DECLARE temp Char;
SET temp = InputRoot.XML.A.(XML.attr)"_client_version";
SET OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number" = temp;


or wait until any body responds to give a direct statement.
Back to top
View user's profile Send private message
bindu
PostPosted: Fri May 14, 2004 9:25 am    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi Missam,
Right now i am doing like that only.....so there is no other way to get directly as element instead of this way...because i have so many attributes and elements
have a nice time.
Thanx,
Bindu
Back to top
View user's profile Send private message
JT
PostPosted: Fri May 14, 2004 10:15 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

bindu,

Try this:
Code:
SET OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number" = THE (SELECT ITEM T from InputRoot.XML.A.(XML.attr)"_client_version" as T);
Back to top
View user's profile Send private message
bindu
PostPosted: Fri May 14, 2004 10:24 am    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

hI,
I TRIED THAT ONE TOO BUT AGAIN IT COMES AS ATTRIBUTE...ANY SUGGESTIONS.

tHANX,
bINDU
Back to top
View user's profile Send private message
JT
PostPosted: Fri May 14, 2004 12:25 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

bindu,
Code:
DECLARE cursor REFERENCE TO InputRoot.XML.A.(XML.Attribute)"_client_version";
SET OutputRoot.XML."soap:Envelope"."soap:Body"."Name"."Number" = FIELDVALUE(cursor);

Confirmed the preceding code creates the XML element Number with the _client_version attribute value:

Code:
  (0x01000010):XML        = (
    (0x01000000):soap:Envelope = (
      (0x01000000):soap:Body = (
        (0x01000000):Name = (
          (0x01000000):Number = (
            (0x02000000): = '1.2.14'
          )
        )
Back to top
View user's profile Send private message
bindu
PostPosted: Fri May 14, 2004 12:46 pm    Post subject: XML....Parsing....MQSI Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Thanq JT,
its working ....thanx for ur time.

Bindu
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML....Parsing....MQSI - solved
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.