fix bugs:

#5
XML codec throw java.util.NoSuchElementException when message is too long

#4
XML codec failed due to special charecter like '\u0000'