xml parser refactoring - attributes workaround