diff --git a/src/Text/XML/Writer.hs b/src/Text/XML/Writer.hs
--- a/src/Text/XML/Writer.hs
+++ b/src/Text/XML/Writer.hs
@@ -58,6 +58,16 @@
                                   , documentEpilogue = def
                                   }
 
+-- | Create a simple Document starting with a root element with attributes.
+documentA :: Name           -- ^ Root node name
+          -> [(Name, Text)] -- ^ Attributes
+          -> XML            -- ^ Contents
+          -> Document
+documentA name attrs children = Document { documentPrologue = Prologue def def 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 }
diff --git a/xml-conduit-writer.cabal b/xml-conduit-writer.cabal
--- a/xml-conduit-writer.cabal
+++ b/xml-conduit-writer.cabal
@@ -1,5 +1,6 @@
+cabal-version:       3.0
 name:                xml-conduit-writer
-version:             0.1.1.2
+version:             0.1.1.3
 synopsis:            Warm and fuzzy creation of XML documents.
 description:
     “It can scarcely be denied that the supreme goal of
@@ -18,14 +19,13 @@
 maintainer:          aenor.realm@gmail.com
 category:            Text
 build-type:          Simple
-cabal-version:       >=1.8
 
 source-repository head
   type: git
   location: https://bitbucket.org/dpwiz/xml-conduit-writer
 
 library
-  ghc-options: -Wall -O2
+  default-language: Haskell2010
   hs-source-dirs: src
   exposed-modules:
     Text.XML.Writer
@@ -38,6 +38,7 @@
     data-default
 
 test-suite tests
+  default-language: Haskell2010
   type: exitcode-stdio-1.0
   main-is: Main.hs
   hs-source-dirs: test/
