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 » Create next sibling query

Post new topic  Reply to topic
 Create next sibling query « View previous topic :: View next topic » 
Author Message
seeknee
PostPosted: Tue Feb 10, 2004 7:18 am    Post subject: Reply with quote

Apprentice

Joined: 08 Aug 2002
Posts: 41
Location: Melbourne, Australia

Hi

Not to sure if this sound obvious but have you tried

SET OutputRoot = InputRoot;
SET OutputRoot.XML.INMSG.APPERROR.ERROR = '123456';
SET OutputRoot.XML.INMSG.APPERROR.ERRORDESC = Description
SET OutputRoot.XML.INMSG.APPERROR.ERRORTIME = Timestamp

This should append your XML.

Hopefully this helps
Back to top
View user's profile Send private message
seeknee
PostPosted: Tue Feb 10, 2004 8:04 am    Post subject: Reply with quote

Apprentice

Joined: 08 Aug 2002
Posts: 41
Location: Melbourne, Australia

Hi again

Try something like this

SET OutputRoot = InputRoot;
SET OutputRoot.XML.INMSG.APPERROR.ERROR = '123456';
SET OutputRoot.XML.INMSG.APPERROR.ERRORDESC = Description
SET OutputRoot.XML.INMSG.APPERROR.ERRORTIME = Timestamp

DECLARE myref REFERENCE TO OutputRoot.XML.INMSG.APPERROR;
DETACH myref;
ATTACH myref TO OutputRoot.XML.TPCIData AS LASTCHILD;
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 10, 2004 8:07 am    Post subject: Re: Create next sibling query Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

ssk wrote:

When I use the following code:

SET OutputRoot = InputRoot;
DECLARE InRef REFERENCE TO OutputRoot.XML.INMSG;
CREATE NEXTSIBLING OF InRef NAME 'APPERROR';

I get the following error message logged: 'The Element APPERROR has an invalid element type for a top level element'.

What am I doing wrong? How can I solve this problem?


Well, by trying to create the next sibling of your Root element, you're trying to create a second XML document root. Which isn't a good idea.

You probably want to create the Last Child, rather than the Next Sibling.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Missam
PostPosted: Tue Feb 10, 2004 10:25 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

why don't you try this

SET OutputRoot = InputRoot;
DECLARE InRef REFERENCE TO OutputRoot.XML.INMSG;
CREATE LASTCHILD OF InRef Name 'APPERROR';
MOVE InRef TO InRef.APPERROR;
CREATE LASTCHILD OF InRef Name 'ERRORSOURCE' VALUE 'Error Flow';
CREATE LASTCHILD OF InRef Name 'ERROR' VALUE 'ErrorChar';
CREATE LASTCHILD OF InRef NAME 'ERRORDESC' VALUE 'ErrorText';
CREATE LASTCHILD OF InRef NAME 'ERRORNODE' VALUE 'ErrorNode';
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 10, 2004 10:36 am    Post subject: Re: Nextsibling Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

ssk wrote:
Basically, the problem is that it makes APPDATA a child of APPERROR.


Where is the code that creates APPDATA? You did not list it.

Also, you do not need to be using CREATE LASTCHILD for everything. You can do the CREATE LASTCHILD to create APPERROR in the correct place, and then do
Code:
set OutputRoot.XML.INMSG.APPERROR.ERRORSOURCE= 'Error Flow'
and etc. once you've properly established where APPEROR belongs.
_________________
I am *not* the model of the modern major general.
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 » Create next sibling query
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.