Hi Johan
I can certainly help with writing ST code, but you mention:
just make sure you cannot already do what you want with XFiles. The reason I mention this is some years ago I wrote some ST code for someone and Bruce chimed in that you could do the same already in XFiles (or perhaps it was JFiles?) in just a few lines of code.
IOW don’t reinvent the wheel.
How do you know what the tags should be? Do you have some list or schema that you are validating against?
similar with the “empty” fields: I think you are saying you want to verify MYREF against some list or schema.
the third requirement that an opening tag matches a closing tag seems straightforward - you probably would use st.matchBrackets and recurse down the structure.
but, as I mentioned, first check if there is already an existing way to do what you are after.
cheers
Geoff R
Edit: I see you asked a similar question in February. Did the various answers there help?