Yes, this is probably the most sensible approach.
Other options would be to ignore everything you don't recognize or ignore all nodes of the form:
unrecognized tag [value]
i.e. where you don't recognize the key and the value is not complex.You could still display stuff like:
unrecognized tag [
[text]
...
]
i.e. text nodes which are children of unrecognized elements.But approaches like these would need a good justification.