Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.XMLSpec.PrintTrees
Description
Print XML trees.
This variant of the function to show XML trees available in HXT is needed because of issues with values being quoted by HXT's default function.
It's based on the same ideas, but it's been implemented using the pretty-library instead of using plain string functions.
Synopsis
- flattenDoc :: Doc -> String
- class Pretty x where
- prettyAttr :: String -> Attributes -> Doc
- prettyContent :: XmlTree -> Doc
- prettyElemType :: String -> XmlTrees -> Doc
- prettyEntity :: String -> Attributes -> XmlTrees -> Doc
- prettyLiteralTrees :: XmlTrees -> Doc
- prettyExternalId :: Attributes -> Doc
- prettyPEAttr :: Attributes -> Doc
- prettyValue :: Attributes -> XmlTrees -> Doc
- prettyEnum :: Attributes -> Doc
- slash :: Doc
- nl :: Doc
- angles :: Doc -> Doc
- (<|>) :: Doc -> Doc -> Doc
- sepBy :: Doc -> [Doc] -> Doc
Documentation
flattenDoc :: Doc -> String Source #
Render a document into a string.
Class for values that can be converted into a document.
Auxiliary functions related to pretty printing XML trees.
prettyAttr :: String -> Attributes -> Doc Source #
Pretty print an attribute followed by its value.
prettyContent :: XmlTree -> Doc Source #
Pretty print a content element.
prettyEntity :: String -> Attributes -> XmlTrees -> Doc Source #
Pretty print an entity.
prettyLiteralTrees :: XmlTrees -> Doc Source #
Pretty print trees as text, quoting them.
prettyExternalId :: Attributes -> Doc Source #
Pretty print an external ID.
prettyPEAttr :: Attributes -> Doc Source #
Pretty print a Parameter Entity Reference.
prettyValue :: Attributes -> XmlTrees -> Doc Source #
Given a list of attributes, pretty print the value in them.
prettyEnum :: Attributes -> Doc Source #