XMLElementFactory improvement

Signed-off-by: aurel <aurel.savoiu@cti.pub.ro>