I have wrote a simple HL7 message parser which is capable of parsing any message type. What it can't do is to validate the message.
The result of the message parsing is a tree which is easily traversable.
Now I want to improve the parser. I want it to be able to apply validation rules to the received message. I am thinking of using XML as a message definition. I am stuck on which approach to take. I am not sure if this makes sense.
Have you ever written a parser not necessarily for HL7 message where you had to apply schema to the message? How did you do that?
Thank you