Serialize MarkdownDocument to XML? #503

Open
opened 2026-01-29 14:38:21 +00:00 by claunia · 0 comments
Owner

Originally created by @wadimw on GitHub (Feb 23, 2022).

Hi,

I'm looking for a way to safely translate existing Markdown documents without risking syntax issues introduced by human error. It seems that your roundtrip support would be perfect for this - in essence, I've been thinking of parsing the document in question with markdig and localizing only selected strings within the AST. That would alleviate the risk of someone accidentally deleting emphasis, inserting an empty line or deleting some significant HTML comment etc.

Translation itself would need to be performed in some other designated system, so I would need to output the generated document tree to some other format and deserialize it afterwards. Do You think it would be possible to serialize an AST of MarkdownDocument into an XML file?

Originally created by @wadimw on GitHub (Feb 23, 2022). Hi, I'm looking for a way to safely translate existing Markdown documents without risking syntax issues introduced by human error. It seems that your roundtrip support would be perfect for this - in essence, I've been thinking of parsing the document in question with markdig and localizing only selected strings within the AST. That would alleviate the risk of someone accidentally deleting emphasis, inserting an empty line or deleting some significant HTML comment etc. Translation itself would need to be performed in some other designated system, so I would need to output the generated document tree to some other format and deserialize it afterwards. Do You think it would be possible to serialize an AST of MarkdownDocument into an XML file?
claunia added the question label 2026-01-29 14:38:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#503