xml-1.3.14: A simple XML library.

Copyright | (c) Galois Inc. 2007
License | BSD3
Maintainer | Iavor S. Diatchki <diatchki@galois.com>
Stability | provisional
Portability |
Safe Haskell | Safe-Inferred
Language | Haskell98

Text.XML.Light.Output

Description

Output handling for the lightweight XML lib.

Synopsis

- showTopElement :: Element -> String
- showContent :: Content -> String
- showElement :: Element -> String
- showCData :: CData -> String
- showQName :: QName -> String
- showAttr :: Attr -> String
- ppTopElement :: Element -> String
- ppContent :: Content -> String
- ppElement :: Element -> String
- ppcTopElement :: ConfigPP -> Element -> String
- ppcContent :: ConfigPP -> Content -> String
- ppcElement :: ConfigPP -> Element -> String
- data ConfigPP
- defaultConfigPP :: ConfigPP
- prettyConfigPP :: ConfigPP
- useShortEmptyTags :: (QName -> Bool) -> ConfigPP -> ConfigPP
- useExtraWhiteSpace :: Bool -> ConfigPP -> ConfigPP
- tagEnd :: QName -> ShowS
- xml_header :: String

# Documentation

showTopElement :: Element -> String #

Adds the ?xml? header.

showContent :: Content -> String #

showElement :: Element -> String #

showCData :: CData -> String #

showQName :: QName -> String #

showAttr :: Attr -> String #

ppTopElement :: Element -> String #

Pretty printing renders XML documents faithfully, with the exception that whitespace may be added/removed in non-verbatim character data.

ppContent :: Content -> String #

Pretty printing content

ppElement :: Element -> String #

Pretty printing elements

ppcTopElement :: ConfigPP -> Element -> String #

Pretty printing renders XML documents faithfully, with the exception that whitespace may be added/removed in non-verbatim character data.

ppcContent :: ConfigPP -> Content -> String #

Pretty printing content

ppcElement :: ConfigPP -> Element -> String #

Pretty printing elements

data ConfigPP #

defaultConfigPP :: ConfigPP #

Default pretty orinting configuration. * Always use abbreviate empty tags.

prettyConfigPP :: ConfigPP #

A configuration that tries to make things pretty (possibly at the cost of changing the semantics a bit through adding white space.)

useShortEmptyTags :: (QName -> Bool) -> ConfigPP -> ConfigPP #

The predicate specifies for which empty tags we should use XML's abbreviated notation /. This is useful if we are working with some XML-ish standards (such as certain versions of HTML) where some empty tags should always be displayed in the TAG/TAG form.

useExtraWhiteSpace :: Bool -> ConfigPP -> ConfigPP #

Specify if we should use extra white-space to make document more readable. WARNING: This adds additional white-space to text elements, and so it may change the meaning of the document.

tagEnd :: QName -> ShowS #

xml_header :: String #

The XML 1.0 header