Rework in terms of a SAX2 parser

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>