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 » Traverse XML message

Post new topic  Reply to topic Goto page Previous  1, 2
 Traverse XML message « View previous topic :: View next topic » 
Author Message
kimbert
PostPosted: Wed Apr 01, 2009 3:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
if we are using XSLT node, then automatically the style sheet and Validation part will come in to this Picture right.
XSLT and XML Schema are two different languages. An XSL processor does not require a schema.
I suggest that you use the ESQL solution.
Back to top
View user's profile Send private message
sapana
PostPosted: Wed Apr 01, 2009 6:38 am    Post subject: Reply with quote

Apprentice

Joined: 16 Apr 2007
Posts: 33
Location: Pune

Pasting the code that traverses entire XML message, recursively using pre-order traversal method extended for non-binary tree and converts field data to upper case.


CREATE PROCEDURE Traverse (IN REF_Cursor REFERENCE)BEGIN

IF ( ( NOT FIELDTYPE(REF_Cursor)=XMLNSC.NamespaceDecl)
AND (FIELDTYPE(REF_Cursor) = NameValue)) THEN
SET REF_Cursor = UPPER(REF_Cursor);
END IF;

MOVE REF_Cursor FIRSTCHILD ;
IF LASTMOVE(REF_Cursor) THEN
CALL Traverse(REF_Cursor);
MOVE REF_Cursor PARENT;
END IF;

MOVE REF_Cursor NEXTSIBLING ;
IF LASTMOVE(REF_Cursor) THEN
CALL Traverse(REF_Cursor);
MOVE REF_Cursor PREVIOUSSIBLING;
END IF;

END;

This worked fine for the XML messages I tested it with, and the code looks simple enough. Let me know if I have overlooked some test case which might lead to failure of above procedure.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

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