fixed 1 < nitem -1 -> i < nitem -1
fixed when parse err xml
add new todo: add reset for parse