BaseX-Talk Digest, Vol 38, Issue 33
Thursday, 21 February 2013 · 1 message
EM
elangovan MuthuSwamy21 Feb 2013 05:14 #
Hi All,
There was a misspell in end of first para. I could get the results within 5 milliseconds using SAX parser misspelled as 5 seconds.
Sorry for the inconvenience caused.
Thanks,
Elango.
Quoted text · 36 lines
> Hi All, > > I am trying to use BaseX Client and server with large XML files(13 MB > size). I have created a database for the XML and evaluated an xpath in > that. When I executed an xpath it takes around 250 milliseconds to fetch > the results. In case of SAX parser I could get the response for the same > xpath within 5 seconds. > > I used following BaseXClient code for this. > > BaseXClient session = new BaseXClient("localhost", 1984, "admin", "admin"); > > // code to fetch the large XML file size. Read from the file. > String xmlString = ....... > > InputStream bais = new ByteArrayInputStream(xmlString.getBytes()); > session.create("database", bais); > > String expression = "/configuration/protocol[starts-with(name, > 'http')]/name"; > > *session.query(expression).execute();* // this line takes 250 milliseconds > to give the result. Where as same xpath can be executed within 5 > milliseconds in SAX parser. > > Am I basically missing anything or something else. > > > Please advice me. > > Thanks in advance. > > -- > Regards, > Elango. >
Written for BaseX 7.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery