[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] xpath full text plugin



Brendan Neutra wrote:

I'm confused about the full text xpath query. When I do the query, I
do get the messages which match the query, however, I was
expecting/hoping that I would get back the actual xml elements/data
that matched the Xpath query, not just the whole message.


The current plugin is a all or nothing filter.
If the query matches, the message is forwarded as is, else
the message is discarded.
You would need to add some lines of code to have the feature
you need in the existing plugin:
xmlBlaster/src/java/org/xmlBlaster/engine/mime/xpath/*.java


rgds Marcel



from pyBlaster import pyBlaster
cl = pyBlaster.XmlBlasterClient()
cl.connect('http://192.168.1.128:8080/')
cl.login('myuname', 'pwd') cl.publish("<key oid='11' contentMime='text/xml' />",


"<msg><data>hello world!</data></msg>","<qos><persistent/></qos>")


ret = cl.get("<key oid='11'/>", "<qos><filter


type='XPathFilter'>/msg/data</filter> </qos>")


print ret[0][1]


<msg><data>hello world!</data></msg>

So it returned the whole message. The response to the Xpath query is
"hello world!" no?  How do I access that? Or can I?

thanks,

Brendan