Extract xml attributes through function

Attributes are extracted through a new function
added first code preperation for using a treeview as xml tree