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 » XMLNSC.Element

Post new topic  Reply to topic
 XMLNSC.Element « View previous topic :: View next topic » 
Author Message
newtobroker
PostPosted: Thu Feb 04, 2010 7:54 pm    Post subject: XMLNSC.Element Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

Hi,

Im new to this forum but i can see lot of good posts in this site. I have a question about XML.Element.

I did read some posts in this forum on XMLNSC.Element but that didnt help me.

I have a complete logic of sequential xml processing written by traversing an XML with MOVE cursor NEXTSIBLING TYPE XML.Element and MOVE cursor FIRSTCHILD TYPE XML.Element.

Now we are moving this logic to XMLNSC parser. So when i tried replacing XML.Element in move statement with XMLNSC.Element, it doesnt seem to work.

I did get some info about XMLNSC.Folder and XMLNSC.Field but thats not helping me here.

In XML parser, we had XML.Element that we could have used to identify any kind of element but here in XMLNSC, there is no such thing. I have to toggle between XMLNSC.Folder and XMLNSC.Field and that makes my sequential logic complicated.

Also if I dont use any TYPE, then my MOVE statement will traverse through all the attributes and thus i lose time in processing.

Is there any effective way of using XMLNSC.Field and Folder to process elements sequentially or is there any specific way to replace XML.Element in my current code with XMLNSC ??

Thanks,
C*
Back to top
View user's profile Send private message
exerk
PostPosted: Fri Feb 05, 2010 2:13 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Moving to the Broker forum...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 05, 2010 3:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
So when i tried replacing XML.Element in move statement with XMLNSC.Element, it doesnt seem to work.
Please give details.

I assume that you have read this topic: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac67192_.htm
Back to top
View user's profile Send private message
newtobroker
PostPosted: Fri Feb 05, 2010 12:09 pm    Post subject: Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

Kimbert,

The below code does not give me any error
Code:

MOVE cursor FIRSTCHILD TYPE XML.Element;


But the below code which i try as a replacement to the above code (as we are moving to XMLNSC parsert) is giving issues - Identifier XMLNSC.Element cannot be resolved.
Code:

MOVE cursor FIRSTCHILD NAMESPACE * TYPE XMLNSC.Element;


What can be the best replaced for the XML.Element in the above MOVE statement ?

Thanks,
C*
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 05, 2010 12:24 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I presume you are getting the error when you deploy the message flow - but you haven't said so, and you have only quoted a fraction of the message.
You're probably on a version of the runtime which does not support XMLNSC.Element. I think it was added in runtime fixpack 6.1.0.4 or 6.1.0.5.
Back to top
View user's profile Send private message
newtobroker
PostPosted: Fri Feb 05, 2010 12:35 pm    Post subject: Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

Kimbert,

Someone suggested me like this

Code:
MOVE cursor FIRSTCHILD NAMESPACE * TYPE (XMLNSC.Folder OR XMLNSC.Field);


Is this the right way, because an element can be of two types either folder or field.

On the version, I think its 6.1 but i have dropped a mail to my admin asking for details.

Thanks,
c *[/code]
Back to top
View user's profile Send private message
newtobroker
PostPosted: Fri Feb 05, 2010 12:38 pm    Post subject: Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

My admin just got back, he says the broker runtime version is 6.1.0.3 on z/OS
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 05, 2010 3:53 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

v6.1.0.3 does not support XMLNSC.Element - the simplest solution ( to this problem, anyway ) would be to upgrade to the latest fixpack.

The code snippet which you posted will not work. There is a way to do what you require, but it's not quite as easy as that. If you can't upgrade then I'll find the solution for you.
Back to top
View user's profile Send private message
newtobroker
PostPosted: Fri Feb 05, 2010 4:09 pm    Post subject: Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

Kimbert,

Yes unfortunately we cannot upgrade. Can you please share the other solution ? This is urgent, appreciate your help.

Another suggestion that came around from one of my friends is using
Code:

MOVE cursor FIRSTCHILD TYPE 0x01000000;


I havent tested this though.

Thanks,
C*
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Feb 08, 2010 4:54 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You will not be able to do this with a TYPE clause on your MOVE statement. Instead, you will need to iterate over the nodes that you are searching and check for XMLNSC.Folder or XMLNSC.PCDataField.

I think this will work, but I haven't tested it:
Code:
SET fieldType = FIELDTYPE(ref) BITOR 0x01000000;
IF fieldType = 0x01000000 THEN
    -- do stuff
ELSE
    move ref to next sibling and try again

Don't forget to check LASTMOVE after every MOVE...
Back to top
View user's profile Send private message
newtobroker
PostPosted: Wed Feb 10, 2010 12:57 pm    Post subject: Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

Thanks Kimbert. I did it in this way

MOVE cursor FIRSTCHILD TYPE XMLNSC.Folder;
IF LASTMOVE(cursor) = FALSE THEN
MOVE cursor FIRSTCHILD TYPE XMLNSC.Field;
END IF;

It seems to work so far...

C *
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 10, 2010 2:27 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

newtobroker wrote:
Thanks Kimbert. I did it in this way

MOVE cursor FIRSTCHILD TYPE XMLNSC.Folder;
IF LASTMOVE(cursor) = FALSE THEN
MOVE cursor FIRSTCHILD TYPE XMLNSC.Field;
END IF;

It seems to work so far...

C *

I'd still do a second check on that lastmove(cursor)...
What happens when you are already at the bottom of the tree??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
newtobroker
PostPosted: Wed Feb 10, 2010 11:32 pm    Post subject: Reply with quote

Novice

Joined: 04 Feb 2010
Posts: 23

fjp_saper,

This condition is inside a loop and if my lastmove fails then i exit. So if its the last then we just exit processing. So far i havent seen any processing errors and the logic seems to be working but need to check on all use cases.

Thanks,
C*
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 » XMLNSC.Element
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.