Getting the root element node in XML using LotusScript

So I don’t forget the next time I want to do this, and trust me, I got a short memory!

Dim xml As String
Dim rootElementNode As NotesDOMElementNode
Set rootElementNode = parseXML(xml)._
getElementsByTagName("THE ROOTNODE").getItem(1)
Public Function parseXML(xml As String) _
As NotesDOMDocumentNode
' Parses the specified xml.
On Error Goto catch
Dim session As New NotesSession()
Dim stream As NotesStream
Set stream = session.createStream()
Call stream.writeText(xml)
Dim domparser As NotesDOMParser
Set domparser = session.createDOMParser(stream)
domParser.exitOnFirstFatalError = True
Call domParser.parse()
Set parseXML = domparser.Document
Exit Function
Error Err, _
Err & "|" & Error & "|" & Lsi_info(2) & ":" & Erl
End Function