To rely on libxml api. IMHO, it should not be defined in pua/ though; but that's a different problem.