Not exactly, these are just sample tags,
Newlines are almost like same but spaces are not can be more or less. But the tag starts with <> and end with a </>. inbetween these two there are sub tags.
However, note that well-formed XML should have only 1 root node.
If your actual XML file has <XML> and </XML> (or <DATA> </DATA> or similar) around these tags of interest you will need to change the match above to L++ == 2 && /^n:/
As an example this output: tag_name="test1 test2" is produced from:
<n:test1><empty/><name>Testing XML tag</name><ignore></ignore></n:test1><n:test2><empty/></n:test2>