Hi Isuru,
I have attached a little example to this mail (in which the result will be streamed as well).
Hope this helps Christian
On Fri, Apr 29, 2016 at 6:23 AM, Isuru Ranawaka isurur@wso2.com wrote:
Hi Christian,
We are in the process of evaluating BaseX as a XPath engine that can be used inside our products. But samples that we have seen are only for evaluating XQuery against a XML Document. Do you have any sample or way that we can evaluate XPath against a InputStream. Because we cannot convert incoming stream in to a document and read it again it will have huge overhead. It will be great if you can provide sample code or reference that can be refer to.
thanks
On Thu, Apr 28, 2016 at 11:11 PM, Christian Grün < christian.gruen@gmail.com> wrote:
Hi Pubudu,
Streaming may be a non-trivial task. Before thinking about pipelining input data, I would first be interested if data transmission will really be a potential bottleneck. Have you already done som profiling?
Cheers, Christian
On Thu, Apr 28, 2016 at 10:45 AM, Pubudu Fernando pubuduf@wso2.com wrote:
Hi,
I was going through the sample file given at [1]. Here, the XML file is taken from a file. Is there any way of giving the XML as a stream instead? The requirement is to use XPath expressions on an XML payload that comes with an HTTP request (the payload will be available to consume, as an InputStream) to check whether the payload contains some given text/data.
I also had a look at [2]. Is this approach valid only for common types like integer, string etc?
[1] - https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/or... [2] - https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/or...
Thanks
*Pubudu Fernando* Software Engineer - Intern WSO2 Inc. m: +94 77 888 2543
https://lk.linkedin.com/in/pubuduf http://blog.pubudu.xyz/ https://github.com/pubudu91 http://stackoverflow.com/users/4329912/pubudu
-- Best Regards Isuru Ranawaka M: +94714629880 Blog : http://isurur.blogspot.com/
basex-talk@mailman.uni-konstanz.de