collect attributes and values for all elements in the xml tree