Add safer method for text extraction from elements
Read names from styles.xml