2

Has anyone used VTD-XML as the XPath engine? I am unable to find any reference to this combination.

This in the lines of: JasperReports fillReport too slow and resource consuming

Should I create my custom implementation of JRXpathExecutor that uses VTD?

Update: Been doing some reading... got another question in this context (didn't want to start a new Q on this): the JRXpathExporter interface expects a NodeList to be created when given XPath expression. Creating a NodeList or a Node by using VTD-XML seems to be a bit round-about. Can I create a NodeList using VTD-XML? Should I?

Community
  • 1
  • 1
GSai
  • 132
  • 2
  • 9
  • Interesting point, what needs to be done to implement JRXpathExecutor? Have you looked at this article? http://community.jaspersoft.com/questions/516715/vtd-xml-datasource-fastest-big-xml-documents – vtd-xml-author Jul 18 '13 at 02:36
  • @vtd-xml-author I did read that article. But the sample code it points to, is a dead link. Page does not exist! To implement JRXpathExecutor, my guess is to create a, say - VtdXmlXPathExecutor, Vtd...Factory, etc like the JaxenXPathExecuter. I am just familiarizing myself with VTD-XML and hence would like to know if this is possible before I can attempt ... – GSai Jul 18 '13 at 05:57
  • What do you want to accomplish? The name of the class you want to implement doesn't tell me that... – vtd-xml-author Jul 18 '13 at 19:07
  • @vtd-xml-author Jasper provides implementations of Jaxen and Xalan for XPath resolution. These are used when having XML as datasource for a Jasper report.(ref: [JaxenXPathExecutor](http://grepcode.com/file/repo1.maven.org/maven2/net.sf.jasperreports/jasperreports/3.7.1/net/sf/jasperreports/engine/util/xml/JaxenXPathExecuter.java) ) The class names are based on those existing implementations. To let Jasper use VTD-XML, we should probably implement Jasper's JRXpathExecutor. I wanted to check if someone has tried this earlier or if this is really possible. – GSai Jul 19 '13 at 07:07
  • Can you contact edikk (the author) or create the datastore from scratch? – vtd-xml-author Jul 19 '13 at 18:14
  • @vtd-xml-author Kindly check the update. Could not find any reference of creating a NodeList from VTD. Any hints? – GSai Jul 28 '13 at 11:20
  • vtd-xml doesn't use NodeList, because vtd-xml is index based addressing, not object based... there is an article called programming xpath with vtd-xml, search it on the web and you will see examples on how to use it....http://www.devx.com/xml/Article/34045 – vtd-xml-author Jul 28 '13 at 23:38
  • @GSai Did you find a way to create a XML data source based on VTD-XML? In my case, I need to extend AbstractXmlDataSource to avoid rewriting our reports. Despite the question regarding XPath resolution, I'm not sure if it is possible because this asbtract class has methods which return DOM node objects. VTD-XML use a different object model. – Fernando Costa Jan 19 '22 at 08:15

0 Answers0