2

I would like to under stand what does reusing XPath mean across XMLs? Does this mean that if I am parsing 100 XMLs, I will only have one AutoPilot and just call AutoPilot.bind in every XML?

vtd-xml-author
  • 3,319
  • 4
  • 22
  • 30
sincang
  • 119
  • 5

1 Answers1

0

Yes, correct. It means that you are going to run the same XPath expressions on different XML files. Try to compile XPath at the beginning, before you bind VTDNav object to AutoPilot object, and reset XPath by calling AutoPilot's resetXPath method before subsequent reuse. If you have multiple threads running the same expressions, you can instantiating multiple AutoPilot objects and compile the same XPath expression for each.

vtd-xml-author
  • 3,319
  • 4
  • 22
  • 30