IG-09: add unit test and fix: lib, xml.