--- /dev/null
+module LWN.XHTML (
+ XHTML,
+ parse_lwn,
+ to_xhtml
+ )
+where
+
+import Text.XML.HXT.Core (
+ IOStateArrow,
+ SysConfigList,
+ XmlTree,
+ no,
+ readString,
+ withParseHTML,
+ withValidate,
+ withWarnings,
+ yes
+ )
+
+class XHTML a where
+ to_xhtml :: a -> String
+
+
+
+-- | Options used when parsing HTML.
+my_read_opts :: SysConfigList
+my_read_opts = [ withValidate no,
+ withParseHTML yes,
+ withWarnings no ]
+
+-- | My version of HandsomeSoup's parseHTML.
+parse_lwn :: String -> IOStateArrow s b XmlTree
+parse_lwn = readString my_read_opts