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 » Question on xpath

Post new topic  Reply to topic
 Question on xpath « View previous topic :: View next topic » 
Author Message
Arya
PostPosted: Mon Aug 11, 2014 10:47 pm    Post subject: Question on xpath Reply with quote

Newbie

Joined: 11 Aug 2014
Posts: 2

Hi All,

I am getting xpath from database as character. I want to retrieve that element from XML. Since the xpath is character , I am not able to retrieve the element from XML. Is any way to convert the character to refer the XML?

For example, my xml is

<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
</book>
<diary>
<abc>* please do not use *</abc>
</diary>
</catalog>

and I get the path catalog.book from database as character. I want to retrieve element book for further processing. But since catalog.book is character, I am not able to retrieve the element. Please suggest a method for doing this.
Back to top
View user's profile Send private message
MB Developer
PostPosted: Tue Aug 12, 2014 5:01 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2014
Posts: 179

Hi Arya,

once refer below link,I believe it will be help for you

link
_________________
Thanks....
Back to top
View user's profile Send private message
Arya
PostPosted: Wed Aug 13, 2014 1:58 am    Post subject: Reply with quote

Newbie

Joined: 11 Aug 2014
Posts: 2

Thanks for the reply.

But my issue is not regarding inserting into DB. Its regarding retrieving the node using data from db.

Below is the issue.
I am using a similar query to retrieve data from XML in ESQL.

Set EV.resultset=select A.B from InputRoot.XMLNSC;

Since I retrieve A.B from cache , I am getting it as character. So the above query is not working as expected. Please give suggestions.

Thanks in advance.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Aug 13, 2014 2:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

ESQL field reference != XPath expression
If the XPath is very,very simply then you may be able to replace / with . and get the correct result. But in my opinion that's a risky technical solution.

The JavaCompute node can execute an XPath expression against the message tree and return a result set. Maybe you can get a more robust solution that way?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 » Question on xpath
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.