Say I have an element <pets animals="dogs, cats, donkey, turtle, rabbit" />
How can I break the long string to when it hits the comma, it separates the animals into substrings? An example output is shown below:
dogs
cats
donkey
turtle
rabbit
Help is appreciated.
Thanks