detect version from xml
detect version from xml
figure out doc version safely