Changed xml parser implementation to be compatible with jdk 1.5