Rough working version for extracting <text> - needs more work