Forum Discussion
The <li-*> tags (li-answer, li-code, li-emoji, li-video, li-image, li-table, li-spoiler, etc.) are Khoros internal placeholder tokens. The raw form in the XML dump is what's stored in the DB; the LiQL API returns a rendered version because the body goes through the platform's server-side rendering pipeline before being returned. There is no public parser/library for these tags — the resolution logic (image signing, video embed HTML, code highlighting, emoji → <img>, spoiler markup, etc.) lives inside the Khoros app.
Practical options, easiest first:
1. *Don't parse the dump - re-fetch via LiQL.* REST API v2 with LiQL (SELECT id, body FROM messages WHERE id IN (...)) or v1 /messages/id/<id>/body both return rendered HTML. If the dump is a one-time snapshot, iterating IDs is straightforward.
2. *Request a dump with rendered bodies.* The Standard XML Export has a config (journaling.addLiTagsResolvedHtml = true) that adds a body-html field alongside body containing resolved HTML. Support can enable it.
3. *Roll your own for a subset.* Only viable if you care about a couple of tag types. Not recommended — li-* isn't a stable public contract and changes across versions.
Option 1 is the best but depends on the use case, whether archival, search indexing, migration etc.