There is a belief, especially popular under university graduates with heads full of Noam Chomsky, in the inherent hierarchy of grammars, and there are people out there who think it's something that has to be followed. Obey the hierarchy, they tell you. I suggest you hear them out, learn what is there to be learned, and then reply, I didn't know there were any rules about this. Dear reader, you are my fellow human and I want you to be strong and empowered. I'm gonna show you how to parse XML with regular expressions, and then you can make your own choices.
This is going to be an introduction for programmers who don't know much bioinformatics, pretty much me before I started working on WormBase ParaSite. For something less ignorant, simplistic, and without swearwords, you could read Genome annotation: from sequence to biology (2001).