Fix #1 by removing libxml errors

there is a bug here https://bugs.php.net/bug.php?id=60021 about
this issue. A new test is also added.