hi , i will look in to those problems and fix them soon. thanks isuru
On Fri, Sep 20, 2013 at 12:42 AM, Kasun Indrasiri <[email protected]>wrote: > Also, if we use different streams instances without instantiating > the XMLStreamingXPath, looks like the previous the result got appended to > the second evaluated value. > > String exampleXML = > "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" + > "\n" + " <getQuote>\n" + > " <request>\n" + > " <symbol>kasun</symbol>\n" + > " </request>\n" + > " </getQuote>"; > String exampleXML2 = > "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" + > "\n" + " <getQuote>\n" + > " <request>\n" + > " <symbol>kasun</symbol>\n" + > " </request>\n" + > " </getQuote>"; > > InputStream inputStream = new > ByteArrayInputStream(exampleXML.getBytes()); > String xpathString = "/getQuote/request/symbol"; > XMLStreamingXPath xmlStreamingXPath = new XMLStreamingXPath(); > xmlStreamingXPath.setXpathQuery(xpathString); > > String val1 = (String)xmlStreamingXPath.getValueOf(inputStream); > String val2 = (String) xmlStreamingXPath.getValueOf(new > ByteArrayInputStream(exampleXML2.getBytes())); > System.out.println("Val " + val1); > System.out.println("Val " + val2); > > --- output -- > Val <symbol>kasun</symbol> > Val <symbol>kasun</symbol><symbol>kasun</symbol> > > > On Thu, Sep 19, 2013 at 11:15 PM, Kasun Indrasiri <[email protected]>wrote: > >> Hi Isuru, >> >> See my comments below. >> >> - We may have room to improve the API of the xmlstreaming xpath and >> current api need to be cleaned up a bit. >> - We need to add namespace support in xmlstream based xpath impl as it is >> commonly used in most integration scenarios. >> - xmlstreamingxpath is currently under synapse core utils and its pretty >> much independent from synapse. We might move it some other module than >> synapse-core. >> - Also during testing, I found some limitations with text nodes(text()). >> We can work on improving those aspects as well. >> - And I think we are good to go ahead with performance comparison for CBR >> with xmlstream xpath and existing xpath support. >> >> Thanks. >> >> [1] http://www.w3.org/TR/xpath/ >> >> >> On Mon, Sep 2, 2013 at 9:56 AM, Kasun Indrasiri <[email protected]>wrote: >> >>> Hi Isuru, >>> >>> I will review the patch and get back to you. In the mean time, we can >>> move ahead with a perf tests which compares the existing and new >>> implementations. >>> >>> >>> On Fri, Aug 30, 2013 at 8:23 AM, isuru janith ranawaka (JIRA) < >>> [email protected]> wrote: >>> >>>> >>>> [ >>>> https://issues.apache.org/jira/browse/SYNAPSE-955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] >>>> >>>> isuru janith ranawaka updated SYNAPSE-955: >>>> ------------------------------------------ >>>> >>>> Attachment: xmlstreamingxpathv_2.patch >>>> >>>> Integrated to synapse. patch taken from trunk/java >>>> >>>> > XPath1.0 Implementation On Top Of XMLStream >>>> > ------------------------------------------- >>>> > >>>> > Key: SYNAPSE-955 >>>> > URL: >>>> https://issues.apache.org/jira/browse/SYNAPSE-955 >>>> > Project: Synapse >>>> > Issue Type: Improvement >>>> > Components: Core >>>> > Affects Versions: FUTURE >>>> > Reporter: isuru janith ranawaka >>>> > Assignee: Andreas Veithen >>>> > Priority: Minor >>>> > Labels: 2013, gsoc >>>> > Attachments: xmlstreamingxpath.patch, >>>> xmlstreamingxpathv_2.patch >>>> > >>>> > >>>> > Current SynapseXPath is operates on top of the Axiom Object Model and >>>> this project is for evaluate XPath On top of the XMLStream. XMLStreamReader >>>> is given as input and the resulting output is given as OMElements. >>>> >>>> -- >>>> This message is automatically generated by JIRA. >>>> If you think it was sent incorrectly, please contact your JIRA >>>> administrators >>>> For more information on JIRA, see: >>>> http://www.atlassian.com/software/jira >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> >>> >>> -- >>> Kasun Indrasiri >>> Associate Technical Lead, >>> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ >>> Blog : http://kasunpanorama.blogspot.com/ >>> >> >> >> >> -- >> Kasun Indrasiri >> Associate Technical Lead, >> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ >> Blog : http://kasunpanorama.blogspot.com/ >> > > > > -- > Kasun Indrasiri > Associate Technical Lead, > WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ > Blog : http://kasunpanorama.blogspot.com/ >
