If your input is, as suggested, XML and your output is HTML, then that is the basic use case for XSLT. The whole point of XML is that you don't have to write your own parser, so if this was being done as a job of work rather than as a school project that would be the first technique to use. If you can't express it as a transformation, then you might look elsewhere.
If you don't want to use XML, then modern tools for plain-text languages include parser expression grammars and DSL synthesis tools such as Microsoft M.
PEGs free you from having to separately lex and parse, so a token can be context sensitive without complicating the grammar (as many tokens are in many languages), and some implementations mean you don't have to worry about left/right recursive loops.
DSL synthesis tools combine an IDE based grammar with a runtime semantics. Martin Fowler has a book on DSLs on his site.
But for a UI definition language that is the input to a transformation, either XML or some other standard mapping of structure (JSON, YAML) which can act as the input to an XSLT processor via the SAX interface would be the first thing I would try.