I worked out a script to split an XML string by tag. The result is put in an array. Other info like the name of the parent node that goes with a result is stored in separate arrays. The XML string represents a DOM load. The main script is: