xml-conduit-writer 0.1.1.3 → 0.1.1.4
raw patch · 2 files changed
+22/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/Text/XML/Writer.hs +21/−0
- xml-conduit-writer.cabal +1/−1
src/Text/XML/Writer.hs view
@@ -68,6 +68,27 @@ , documentEpilogue = def } +-- | Create a simple Document starting with a root element with a doctype.+documentD :: Name -- ^ Root node name+ -> Maybe Doctype -- ^ DOCTYPE + -> XML -- ^ Contents+ -> Document+documentD name dt children = Document { documentPrologue = Prologue def dt def+ , documentRoot = Element name def (render children)+ , documentEpilogue = def+ }++-- | Create a simple Document starting with a root element with attributes and doctype.+documentAD :: Name -- ^ Root node name+ -> [(Name, Text)] -- ^ Attributes+ -> Maybe Doctype -- ^ DOCTYPE+ -> XML -- ^ Contents+ -> Document+documentAD name attrs dt children = Document { documentPrologue = Prologue def dt def+ , documentRoot = Element name (M.fromList attrs) (render children)+ , documentEpilogue = def+ }+ -- | Render document using xml-conduit's pretty-printer. pprint :: Document -> IO () pprint = TL.putStrLn . renderText def { rsPretty = True }
xml-conduit-writer.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: xml-conduit-writer-version: 0.1.1.3+version: 0.1.1.4 synopsis: Warm and fuzzy creation of XML documents. description: “It can scarcely be denied that the supreme goal of