Question

I'm using SGML Reader to format my html snippets as shown here https://github.com/MindTouch/SGMLReader. Problem is it adds missing tags like in the code. Is there is any way to stop that.

Was it helpful?

Solution

SgmlReader is intended to convert the source into a valid HTML document. Hence, it will always surround the parsed content with . If you want to remove some of the tags, you can traverse the XML document and either remove the nodes you don't want or, alternatively, copy only the nodes you want to a new XML document.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top