support xml, move duplicated xml/pbf code to base