Store the position of XmlPullParser

Wrelliors8e

New Member
I'm using the XmlPullParser for parsing a xml file in Android. However i want to pause the parser whenever i want.I use Filechannels, which i create from a RandomAccessFile. Then I create an Inputstream using the method Channels.newInputstream().My idea was to store the position of each xml start tag, and when i pause and then resume the operation, i set the position of the filechannel to the previous stored one.However i face the problem that the XMLPullParser uses a buffer of 8231 bytes. This means i can't know the exact position of the xml start tag.I saw that the xmlpullparser has a getLineNumber() method, but i can't see any set method.Has anyone an idea how i can know the exact position of the xml start tag inside the file ?Best regards.
 
Back
Top