From: <al...@sa...> - 2016-10-05 15:07:10
|
Is there a way to avoid having to call setDoc and parse each time we need to use VTDNav? We want to create one VTDGen object per XML document and re-use it for xpath queries. Right now, we are loading the VTDGen object each time we need to run a query, like this: VTDGen vtdGen = new VTDGen(); vtdGen.setDoc(xmlBytes); vtdGen.parse(false); VTDNav vtdNav = vtdGen.getNav(); Instead, we would like to pass the vtdGen object to different methods and not call setDoc() and parse() every time. The problem occurs with VTDNav - it seems that it must be created right after calling VTDGen.parse(). Otherwise we get an exception "Value does not fall within the selected range" when using vtdGen.getNav() We are using VTDXML 2.11 in C# and Java. (because v2.12 only works with Java) Thanks, Al |