|
From: <jz...@xi...> - 2013-01-14 21:44:10
|
check out bookMark, which may be what u are looking for...
----- Original Message -----
From: Dmitry Frank
To:
Cc:
Sent:Mon, 14 Jan 2013 19:39:29 +0400
Subject:[Vtd-xml-users] Randomly save and restore VTDNav's context
Hello.
For my app, it's very convinient to save current context of VTDNav
and restore it whenever I want.
But there's only two ways to save/restore context I know from the
docs: push()/pop(), and NodeRecorder.
Neither of these ways are convinient for me: I need for really random
access. Not stack way, like push()/pop(), and no NodeRecorder way.
that can only iterate saved items node-by-node.
I need to be able to get context as a byte array, and to restore it
in the same manner.
So, I added the following methods to the VTDNav.java [1] :
/** * Return context that can be restored later by calling
restoreContext(). * by dfrank. */ public int[] getContext() { int[]
ret = new int[ stackTemp.length ]; for (int i = 0; i
Links:
------
[1] http://VTDNav.java
|