de/encode html and parse xml