added parsing of nodes and attributes