Convert hp to XML