sgml-lexical-context

sgml-lexical-context is an autoloaded compiled Lisp function in `sgml-mode.el'.

(sgml-lexical-context &optional LIMIT)

Return the lexical context at point as (TYPE . START).
START is the location of the start of the lexical element.
TYPE is one of `string', `comment', `tag', `cdata', `pi', or `text'.

Optional argument LIMIT is the position to start parsing from.
If nil, start from a preceding tag at indentation.