XML stream parser for block detection