Author |
Message
|
bindu |
Posted: Thu May 13, 2004 11:57 am Post subject: XML....Parsing....MQSI - solved |
|
|
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 |
|
 |
Missam |
Posted: Thu May 13, 2004 12:33 pm Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Can you post your code here..? |
|
Back to top |
|
 |
bindu |
Posted: Thu May 13, 2004 1:50 pm Post subject: XML....Parsing....MQSI |
|
|
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 |
|
 |
Missam |
Posted: Thu May 13, 2004 4:00 pm Post subject: |
|
|
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 |
|
 |
bindu |
Posted: Fri May 14, 2004 6:01 am Post subject: XML....Parsing....MQSI |
|
|
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 |
|
 |
jefflowrey |
Posted: Fri May 14, 2004 6:09 am Post subject: Re: XML....Parsing....MQSI |
|
|
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 |
|
 |
bindu |
Posted: Fri May 14, 2004 6:23 am Post subject: XML....Parsing....MQSI |
|
|
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 |
|
 |
bindu |
Posted: Fri May 14, 2004 6:28 am Post subject: XML....Parsing....MQSI |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Nope i am getting the value for that element |
|
Back to top |
|
 |
Missam |
Posted: Fri May 14, 2004 7:31 am Post subject: |
|
|
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 |
|
 |
bindu |
Posted: Fri May 14, 2004 9:25 am Post subject: XML....Parsing....MQSI |
|
|
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 |
|
 |
JT |
Posted: Fri May 14, 2004 10:15 am Post subject: |
|
|
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 |
|
 |
bindu |
Posted: Fri May 14, 2004 10:24 am Post subject: XML....Parsing....MQSI |
|
|
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 |
|
 |
JT |
Posted: Fri May 14, 2004 12:25 pm Post subject: |
|
|
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 |
|
 |
bindu |
Posted: Fri May 14, 2004 12:46 pm Post subject: XML....Parsing....MQSI |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Thanq JT,
its working ....thanx for ur time.
Bindu |
|
Back to top |
|
 |
|