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 » Reading XML Attribute with namespace

Post new topic  Reply to topic
 Reading XML Attribute with namespace « View previous topic :: View next topic » 
Author Message
malammik
PostPosted: Mon Apr 18, 2005 9:22 am    Post subject: Reading XML Attribute with namespace Reply with quote

Partisan

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

I have an XML which begins like this
**************************************************
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v2004 rel. 4 U (http://www.xmlspy.com)-->
<ArchMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:\xml\ArchMessage.xsd">
<Id>2</Id>
<PubSubService>
<Subscription xsi:type="XPathPlusSubscription" >
***************************************************
When I try to access the type attribute like this
InputRoot.XML.ArchMessage.PubSubService.Subscription.(XML.Attribute)type
OR
InputRoot.XML.ArchMessage.PubSubService.Subscription.(XML.Attribute)xsi:type
I am not getting the value. I know that this is wrong 100% because of namespaces. How do I access this namespaced attribute correctly?

My input format is XML should it be XMLNS? What changes should I make in ESQL to get the value of the attribute?

Thanks a lot.
_________________
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
frankies
PostPosted: Mon Apr 18, 2005 11:52 pm    Post subject: About the namespace. Reply with quote

Newbie

Joined: 07 Mar 2005
Posts: 6

Add
'' DECLARE xsi NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
"
before
"
InputRoot.XML.ArchMessage.PubSubService.Subscription.(XML.Attribute)xsi:type
"
Back to top
View user's profile Send private message
malammik
PostPosted: Sat Apr 23, 2005 8:55 am    Post subject: Reply with quote

Partisan

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

frankie, thanks for the tip. Unfortunately, it still does not solve them problem. I am still getting failed to navigate error. Any tips are appreciated.
_________________
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
malammik
PostPosted: Sat Apr 23, 2005 9:01 am    Post subject: Reply with quote

Partisan

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

Perhaps I have to operate in the XMLNS domain rather than XML in order for this to work.
_________________
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
malammik
PostPosted: Sat Apr 23, 2005 4:10 pm    Post subject: Reply with quote

Partisan

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

Namespaces are ignored in the XML domain. I switched to XMLNS domain and now I am all in business. Thank a lot Alexey and frankie
_________________
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
dipankar
PostPosted: Mon Apr 25, 2005 2:19 am    Post subject: hello Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

you can use FIELDVALUE function to get the attribute value in XML domain.
Please see the following ESQL code-
FIELDVALUE(InputBody.ArchMessage.PubSubService.Subscription ."xsi:type");
Back to top
View user's profile Send private message
malammik
PostPosted: Mon Apr 25, 2005 7:01 am    Post subject: Reply with quote

Partisan

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

That works too. Thanks.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reading XML Attribute with namespace
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.