cleanup xml value extraction

fixes #2