Rewrote splitTagsFromText function to be specific to xml markup