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 » custom java plugin node retrieving xml attribute values

Post new topic  Reply to topic
 custom java plugin node retrieving xml attribute values « View previous topic :: View next topic » 
Author Message
malammik
PostPosted: Thu Mar 17, 2005 11:33 am    Post subject: custom java plugin node retrieving xml attribute values Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

I am making a custom java node that will process xml messages to perform xpath queries. One of the xml objects that I need to be able to access are xml attributes. It appears that the plug-in api allows you to create elements that contain attributes but I can't find any way to access them. For example, if I have xml that looks like this
<letter xmlns="alphabet_letters">
A
</letter>

I cannot find any way through the plugin API to access the value of xmlns. Has anyone tried this?

Thanks,
Mikhail.
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
jefflowrey
PostPosted: Thu Mar 17, 2005 11:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You may have to use MBElement.getFirstChild, MBElement.getNextSibling to walk the tree to find what you need.

You might be able to construct a path that would work for MBElement.getFirstElementByPath, but the fact is that XML Attributes are MBElements of a different type than XML Elements are. I think they end up being NameValue elements instead of Name elements with Value element children. Or the other way around...

Look at a Trace of an XML file with Attributes. It may help you map between the MBElement calls you need to make and the tree structure that is produced.
_________________
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 » custom java plugin node retrieving xml attribute values
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.