| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Text.XML.Expat.Internal.DocumentClass
Description
Type classes to allow for XML handling functions to be generalized to work with different document types.
Synopsis
- data XMLDeclaration text = XMLDeclaration text (Maybe text) (Maybe Bool)
- data DocumentTypeDeclaration c tag text = DocumentTypeDeclaration
- data Misc text
- = Comment !text
- | ProcessingInstruction !text !text
- type family NodeType (d :: (* -> *) -> * -> * -> *) :: (* -> *) -> * -> * -> *
- class (Functor c, List c, NodeClass (NodeType d) c) => DocumentClass d c where
- mkPlainDocument :: DocumentClass d c => NodeType d c tag text -> d c tag text
- modifyXMLDeclaration :: DocumentClass d c => (Maybe (XMLDeclaration text) -> Maybe (XMLDeclaration text)) -> d c tag text -> d c tag text
- modifyDocumentTypeDeclaration :: DocumentClass d c => (Maybe (DocumentTypeDeclaration c tag text) -> Maybe (DocumentTypeDeclaration c tag text)) -> d c tag text -> d c tag text
- modifyTopLevelMiscs :: DocumentClass d c => (c (Misc text) -> c (Misc text)) -> d c tag text -> d c tag text
- modifyRoot :: DocumentClass d c => (NodeType d c tag text -> NodeType d c tag text) -> d c tag text -> d c tag text
Documentation
data XMLDeclaration text Source #
XML declaration, consisting of version, encoding and standalone.
The formatting functions always outputs only UTF-8, regardless of what encoding is specified here. If you want to produce a document in a different encoding, then set the encoding here, format the document, and then convert the output text from UTF-8 to your desired encoding using some text conversion library.
Constructors
Instances
Methods
(==) :: XMLDeclaration text -> XMLDeclaration text -> Bool #
(/=) :: XMLDeclaration text -> XMLDeclaration text -> Bool #
Methods
showsPrec :: Int -> XMLDeclaration text -> ShowS #
show :: XMLDeclaration text -> String #
showList :: [XMLDeclaration text] -> ShowS #
data DocumentTypeDeclaration c tag text Source #
Stub for future expansion.
Constructors
Instances
Methods
(==) :: DocumentTypeDeclaration c tag text -> DocumentTypeDeclaration c tag text -> Bool #
(/=) :: DocumentTypeDeclaration c tag text -> DocumentTypeDeclaration c tag text -> Bool #
Methods
showsPrec :: Int -> DocumentTypeDeclaration c tag text -> ShowS #
show :: DocumentTypeDeclaration c tag text -> String #
showList :: [DocumentTypeDeclaration c tag text] -> ShowS #
Instances
class (Functor c, List c, NodeType d) c) => DocumentClass d c where Source #
Minimal complete definition
getXMLDeclaration, getDocumentTypeDeclaration, getTopLevelMiscs, getRoot, mkDocument
Methods
getXMLDeclaration :: d c tag text -> Maybe (XMLDeclaration text) Source #
Get the XML declaration for this document.
getDocumentTypeDeclaration :: d c tag text -> Maybe (DocumentTypeDeclaration c tag text) Source #
Get the Document Type Declaration (DTD) for this document.
getTopLevelMiscs :: d c tag text -> c (Misc text) Source #
Get the top-level Misc nodes for this document.
getRoot :: d c tag text -> NodeType d c tag text Source #
Get the root element for this document.
mkDocument :: Maybe (XMLDeclaration text) -> Maybe (DocumentTypeDeclaration c tag text) -> c (Misc text) -> NodeType d c tag text -> d c tag text Source #
Make a document with the specified fields.
Instances
Methods
getXMLDeclaration :: DocumentG ann c tag text -> Maybe (XMLDeclaration text) Source #
getDocumentTypeDeclaration :: DocumentG ann c tag text -> Maybe (DocumentTypeDeclaration c tag text) Source #
getTopLevelMiscs :: DocumentG ann c tag text -> c (Misc text) Source #
getRoot :: DocumentG ann c tag text -> NodeType (DocumentG ann) c tag text Source #
mkDocument :: Maybe (XMLDeclaration text) -> Maybe (DocumentTypeDeclaration c tag text) -> c (Misc text) -> NodeType (DocumentG ann) c tag text -> DocumentG ann c tag text Source #
mkPlainDocument :: DocumentClass d c => NodeType d c tag text -> d c tag text Source #
Make a document with the specified root node and all other information set to defaults.
modifyXMLDeclaration :: DocumentClass d c => (Maybe (XMLDeclaration text) -> Maybe (XMLDeclaration text)) -> d c tag text -> d c tag text Source #
modifyDocumentTypeDeclaration :: DocumentClass d c => (Maybe (DocumentTypeDeclaration c tag text) -> Maybe (DocumentTypeDeclaration c tag text)) -> d c tag text -> d c tag text Source #
modifyTopLevelMiscs :: DocumentClass d c => (c (Misc text) -> c (Misc text)) -> d c tag text -> d c tag text Source #
modifyRoot :: DocumentClass d c => (NodeType d c tag text -> NodeType d c tag text) -> d c tag text -> d c tag text Source #