Safe Haskell | None |
---|---|
Language | Haskell2010 |
Zenacy.HTML.Internal.HTML
Description
Defines the top-level HTML types and parser functions.
Synopsis
- data HTMLOptions = HTMLOptions {}
- data HTMLResult = HTMLResult {}
- data HTMLError = HTMLError {
- htmlErrorText :: !Text
- data HTMLNode
- = HTMLDocument {
- htmlDocumentName :: !Text
- htmlDocumentChildren :: ![HTMLNode]
- | HTMLDoctype {
- htmlDoctypeName :: !Text
- htmlDoctypePublicID :: !(Maybe Text)
- htmlDoctypeSystemID :: !(Maybe Text)
- | HTMLFragment {
- htmlFragmentName :: !Text
- htmlFragmentChildren :: ![HTMLNode]
- | HTMLElement { }
- | HTMLTemplate { }
- | HTMLText {
- htmlTextData :: !Text
- | HTMLComment {
- htmlCommentData :: !Text
- = HTMLDocument {
- data HTMLAttr = HTMLAttr {}
- data HTMLNamespace
- data HTMLAttrNamespace
- htmlParse :: HTMLOptions -> Text -> Either HTMLError HTMLResult
- htmlParseEasy :: Text -> HTMLNode
- htmlFragment :: HTMLOptions -> Text -> Either HTMLError HTMLResult
- htmlDefaultDocument :: HTMLNode
- htmlDefaultDoctype :: HTMLNode
- htmlDefaultFragment :: HTMLNode
- htmlDefaultElement :: HTMLNode
- htmlDefaultTemplate :: HTMLNode
- htmlDefaultText :: HTMLNode
- htmlDefaultComment :: HTMLNode
- htmlAttr :: Text -> Text -> HTMLAttr
- htmlElem :: Text -> [HTMLAttr] -> [HTMLNode] -> HTMLNode
- htmlText :: Text -> HTMLNode
Documentation
data HTMLOptions Source #
Defines options for the HTML parser.
Constructors
HTMLOptions | |
Fields
|
Instances
Eq HTMLOptions Source # | |
Defined in Zenacy.HTML.Internal.HTML | |
Ord HTMLOptions Source # | |
Defined in Zenacy.HTML.Internal.HTML Methods compare :: HTMLOptions -> HTMLOptions -> Ordering # (<) :: HTMLOptions -> HTMLOptions -> Bool # (<=) :: HTMLOptions -> HTMLOptions -> Bool # (>) :: HTMLOptions -> HTMLOptions -> Bool # (>=) :: HTMLOptions -> HTMLOptions -> Bool # max :: HTMLOptions -> HTMLOptions -> HTMLOptions # min :: HTMLOptions -> HTMLOptions -> HTMLOptions # | |
Show HTMLOptions Source # | |
Defined in Zenacy.HTML.Internal.HTML Methods showsPrec :: Int -> HTMLOptions -> ShowS # show :: HTMLOptions -> String # showList :: [HTMLOptions] -> ShowS # | |
Default HTMLOptions Source # | Defines default options. |
Defined in Zenacy.HTML.Internal.HTML Methods def :: HTMLOptions # |
data HTMLResult Source #
Defines an HTML parser result.
Constructors
HTMLResult | |
Fields
|
Instances
Eq HTMLResult Source # | |
Defined in Zenacy.HTML.Internal.HTML | |
Ord HTMLResult Source # | |
Defined in Zenacy.HTML.Internal.HTML Methods compare :: HTMLResult -> HTMLResult -> Ordering # (<) :: HTMLResult -> HTMLResult -> Bool # (<=) :: HTMLResult -> HTMLResult -> Bool # (>) :: HTMLResult -> HTMLResult -> Bool # (>=) :: HTMLResult -> HTMLResult -> Bool # max :: HTMLResult -> HTMLResult -> HTMLResult # min :: HTMLResult -> HTMLResult -> HTMLResult # | |
Show HTMLResult Source # | |
Defined in Zenacy.HTML.Internal.HTML Methods showsPrec :: Int -> HTMLResult -> ShowS # show :: HTMLResult -> String # showList :: [HTMLResult] -> ShowS # | |
Default HTMLResult Source # | Defines a default result. |
Defined in Zenacy.HTML.Internal.HTML Methods def :: HTMLResult # |
An HTML error type.
Constructors
HTMLError | |
Fields
|
Instances
Eq HTMLError Source # | |
Ord HTMLError Source # | |
Show HTMLError Source # | |
Default HTMLError Source # | Defines a default error. |
Defined in Zenacy.HTML.Internal.HTML |
Defines the model type for an HTML document.
Constructors
HTMLDocument | |
Fields
| |
HTMLDoctype | |
Fields
| |
HTMLFragment | |
Fields
| |
HTMLElement | |
Fields
| |
HTMLTemplate | |
Fields
| |
HTMLText | |
Fields
| |
HTMLComment | |
Fields
|
An HTML element attribute type.
Constructors
HTMLAttr | |
Fields |
data HTMLNamespace Source #
An HTML namespace type.
Constructors
HTMLNamespaceHTML | |
HTMLNamespaceSVG | |
HTMLNamespaceMathML |
Instances
Eq HTMLNamespace Source # | |
Defined in Zenacy.HTML.Internal.Types Methods (==) :: HTMLNamespace -> HTMLNamespace -> Bool # (/=) :: HTMLNamespace -> HTMLNamespace -> Bool # | |
Ord HTMLNamespace Source # | |
Defined in Zenacy.HTML.Internal.Types Methods compare :: HTMLNamespace -> HTMLNamespace -> Ordering # (<) :: HTMLNamespace -> HTMLNamespace -> Bool # (<=) :: HTMLNamespace -> HTMLNamespace -> Bool # (>) :: HTMLNamespace -> HTMLNamespace -> Bool # (>=) :: HTMLNamespace -> HTMLNamespace -> Bool # max :: HTMLNamespace -> HTMLNamespace -> HTMLNamespace # min :: HTMLNamespace -> HTMLNamespace -> HTMLNamespace # | |
Show HTMLNamespace Source # | |
Defined in Zenacy.HTML.Internal.Types Methods showsPrec :: Int -> HTMLNamespace -> ShowS # show :: HTMLNamespace -> String # showList :: [HTMLNamespace] -> ShowS # | |
Default HTMLNamespace Source # | Defines a default namespace. |
Defined in Zenacy.HTML.Internal.Types Methods def :: HTMLNamespace # |
data HTMLAttrNamespace Source #
An HTML attribute namespace type.
Constructors
HTMLAttrNamespaceNone | |
HTMLAttrNamespaceXLink | |
HTMLAttrNamespaceXML | |
HTMLAttrNamespaceXMLNS |
Instances
htmlParse :: HTMLOptions -> Text -> Either HTMLError HTMLResult Source #
Parses an HTML document.
htmlParseEasy :: Text -> HTMLNode Source #
Parses an HTML document the easy way.
htmlFragment :: HTMLOptions -> Text -> Either HTMLError HTMLResult Source #
Parses an HTML fragment.
htmlDefaultDocument :: HTMLNode Source #
Defines a default document.
htmlDefaultDoctype :: HTMLNode Source #
Defines a default document type.
htmlDefaultFragment :: HTMLNode Source #
Defines a default document fragment.
htmlDefaultElement :: HTMLNode Source #
Defines a default element.
htmlDefaultTemplate :: HTMLNode Source #
Defines a default template.
htmlDefaultText :: HTMLNode Source #
Defines a default text.
htmlDefaultComment :: HTMLNode Source #
Defines a default comment.