•  

    Great article.

    But it looks like there is an error in a code.

    If XML tag happens start right before position 8000 (or multiple of) it will not be found.

    This may be a fix:

    Set @parsedlen = @parsedlen + 8000 - len(@parsedval)+1