Letter 7 of xml string is '<'.
'substring of xmlstring before '<' is empty because, starting from the beginning of xml string there are no letters before the initial '<'
Thanks for this assistance. We would like to import a music notation interchange format known as "Music XML" into Snap! We can do this by using Excel to convert the file to a comma delimited format, and then import into Snap!
However, it will be nice to do the parsing directly in Snap! without the intermediate step.
Neither of the splitting methods above will be effective at parsing an xml file, like Music XML, that has nested parts. The good thing is that Music XML looks pretty easy to parse.
The good news is, there's a library to parse JSON...
Personally I think the "><" technique is a little fragile. Especially since in the typical use case, the actual information comes in between the ">" and the "<"!
Depending on just how recursive it is, my first try would be regular expressions looking for "<foo>[^<]*</foo>" and replace the stuff on the inside with a list that includes the tag and the payload, and keep doing that until you run out of tags. That way you are gathering from the inside out.