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 » How to strore XML teg with it's child tags into database

Post new topic  Reply to topic
 How to strore XML teg with it's child tags into database « View previous topic :: View next topic » 
Author Message
dev
PostPosted: Fri Feb 22, 2002 2:44 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Oct 2001
Posts: 30

Hi,
I have a XML message as follows:
<?xml version="1.0" ?>
- <Pub>
- <Header>
<TableName>xxxxxx</TableName>
<SchemaName>xxxxxxx</SchemaName>
<ClientId>xxxx</ClientId>
+ <PrimaryKey>
<Key1>xxxxxx</Key1>
</PrimaryKey>
+ <MQMD>
<ReplyToQMgr>MQ_Q_MGR_NAME</ReplyToQMgr>
<Report>MQRO_NONE</Report>
<StrucId>MQMD_STRUC_ID</StrucId>
<UserIdentifier>MQ_USER_ID</UserIdentifier>
<Version>MQMD_CURRENT_VERSION</Version>
</MQMD>
<Date />
<Time />
</Header>
<Data />
</Pub>

I want to store Header and it's all child into database.

I wrote INSERT INTO TABLE_NAME(FIELD_NAME) VALUES("Body"."pub"."Header");

It's not stroing desired.

Can anyone help me to refer Header Tag and with it's all child tags to store into databe?

Thanks
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Feb 22, 2002 4:29 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Hi,

As per your message you should use upper case 'P' for Pub. Try using this ESQL,
INSERT INTO Database.TABLE_NAME(FIELD_NAME) VALUES("Body"."Pub"."Header");

If you want to store and retrieve XML messages to/from the DB, it is worth looking at http://www.mqseries.net/phpBB/viewtopic.php?topic=1763&forum=7&5 thread.

Regards,
Kiran
Back to top
View user's profile Send private message Visit poster's website
dev
PostPosted: Fri Feb 22, 2002 4:58 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Oct 2001
Posts: 30

Kirani,
Thanks for helping but it doesn't resolve my problem because in actual message it's 'pub' only . the link you referred does store xml message completely in one field also need to be resetted content descriptor to BLOB before that so I can not strore it's filed to other columns and Header and Data with it's child entities to it's respective filelds.

Any help would be appreciated.
Thanks

[ This Message was edited by: dev on 2002-02-22 16:58 ]

[ This Message was edited by: dev on 2002-02-22 16:59 ]

[ This Message was edited by: dev on 2002-02-22 17:00 ]
Back to top
View user's profile Send private message
amigupta1978
PostPosted: Fri Feb 22, 2002 6:07 pm    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

Hi,
What exactly do u wanna store...this will not store the child tags in the header it will only store the value which is in the header tag but not the ... for this u have to convert the message to BLOB and u can then store as bitstream..or try using loop to traverse within the Header tag using Header.*[I] loop and chk the fieldname and the field value...

amit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kirani
PostPosted: Fri Feb 22, 2002 6:43 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Dev,

To to albe to understand the incoming message layout could you please add a "Trace" node after your MQInput node and post the output of trace node over here.

Regards,
Kiran

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

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to strore XML teg with it's child tags into database
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.