Blockchain Parser not working on blockchain generated in regtest mode using bitcoind. Any help? Has anyone used this blockchain parser for Bitcoin https://code.google.com/p/blockchain/ ?

http://codesuppository.blogspot.in/2014/01/a-command-line-interface-for-blockchain.html

I tried to parse blockchain generated by Bitcoin (bitcoind -regtest -daemon) in regtest mode but it is not reading(parsing) it correctly. 

I copied the file blk00000.dat (this is the only file generated in regtest mode) to /home/somesh/Desktop/blockchain-read-only/ folder.  I executed the command:   ./blockchain.out /home/somesh/Desktop/blockchain-read-only

output:

Successfully opened block-chain input file '/home/somesh/Desktop/blockchain-read-only/blk00000.dat'
Welcome ...
Commands available: ... (then prints all the available commands)


then I selected scanning option

scan


The following is the message I get on scanning 

Scanning block-chain re-started from block 0 up to a maximum of 500000 blocks..&lt;br&gt;
Warning: Missing block-header; scanning for next one.
Failed to open block-chain input file '/home/somesh/Desktop/blockchain-read-only/blk00001.dat'&lt;br&gt;
Finished scanning block headers. Built block-chain with 0 blocks found..


It is working fine for Bitcoin's real blockchain but not for the blockchain generated in regtest mode.

I think the parser is not able to find the block header in blk00000.dat and is skipping to next file.

Warning: Missing block-header; scanning for next one.

what changes do I have to make ?
When working in regTest (or testNet) mode the 'magic number' identifying the start of each block is different to what it is for the live network.  The parser you mention may well use the magic number to identify the start of blocks. This may be the cause of your problem and why it is not finding any blocks in the regTest blockchain file.

RegTest (and testNet): 0xdab5bffa
 Live: 0xd9b4bef9

Hence it is likely that the parser code needs to be modified to work with regTest/testNet magic numbers.