xmlsource should be loaded before use