Write preference XML using libxml++