zenacy-html-2.1.0: A standard compliant HTML parsing library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Zenacy.HTML.Internal.DOM

Description

Defines the HTML DOM types and functions.

Synopsis

Documentation

data DOM Source #

DOM represents an HTML document while being parsed.

Constructors

DOM 

Fields

Instances

Instances details
Show DOM Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

showsPrec :: Int -> DOM -> ShowS #

show :: DOM -> String #

showList :: [DOM] -> ShowS #

Default DOM Source #

Defines a default DOM.

Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

def :: DOM #

Eq DOM Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

(==) :: DOM -> DOM -> Bool #

(/=) :: DOM -> DOM -> Bool #

Ord DOM Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

compare :: DOM -> DOM -> Ordering #

(<) :: DOM -> DOM -> Bool #

(<=) :: DOM -> DOM -> Bool #

(>) :: DOM -> DOM -> Bool #

(>=) :: DOM -> DOM -> Bool #

max :: DOM -> DOM -> DOM #

min :: DOM -> DOM -> DOM #

data DOMNode Source #

Node is the model type for an HTML document.

Instances

Instances details
Show DOMNode Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Eq DOMNode Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

(==) :: DOMNode -> DOMNode -> Bool #

(/=) :: DOMNode -> DOMNode -> Bool #

Ord DOMNode Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

data DOMAttr Source #

An HTML element attribute type.

Instances

Instances details
Show DOMAttr Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Default DOMAttr Source #

Defines a default attribute.

Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

def :: DOMAttr #

Eq DOMAttr Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

(==) :: DOMAttr -> DOMAttr -> Bool #

(/=) :: DOMAttr -> DOMAttr -> Bool #

Ord DOMAttr Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

data DOMType Source #

Identifies the type of an element.

Instances

Instances details
Show DOMType Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Eq DOMType Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

(==) :: DOMType -> DOMType -> Bool #

(/=) :: DOMType -> DOMType -> Bool #

Ord DOMType Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

data DOMQuirks Source #

Indentifies the quirks mode.

data DOMPos Source #

Defines a position in the DOM.

Constructors

DOMPos 

Instances

Instances details
Show DOMPos Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Eq DOMPos Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

Methods

(==) :: DOMPos -> DOMPos -> Bool #

(/=) :: DOMPos -> DOMPos -> Bool #

Ord DOMPos Source # 
Instance details

Defined in Zenacy.HTML.Internal.DOM

type DOMID = Int Source #

Defines an ID for a node in a document.

type DOMMap = IntMap DOMNode Source #

Defines a mapping between node references and nodes.

domAttrMake :: BS -> BS -> DOMAttr Source #

Makes an attribute.

domDefaultDocument :: DOMNode Source #

Defines a default document.

domDefaultDoctype :: DOMNode Source #

Defines a default document type.

domDefaultFragment :: DOMNode Source #

Defines a default document fragment.

domDefaultElement :: DOMNode Source #

Defines a default element.

domDefaultTemplate :: DOMNode Source #

Defines a default template.

domDefaultText :: DOMNode Source #

Defines a default text.

domDefaultComment :: DOMNode Source #

Defines a default comment.

domDefaultType :: DOMType Source #

Defines a default type.

domMakeTypeHTML :: BS -> DOMType Source #

Makes a new HTML element type.

domMakeTypeMathML :: BS -> DOMType Source #

Makes a new MathML element type.

domMakeTypeSVG :: BS -> DOMType Source #

Makes a new SVG element type.

domPos :: DOMID -> DOMPos Source #

Makes a new position.

domNull :: DOMID Source #

The null node ID.

domRoot :: DOMID Source #

The root document node ID.

domRootPos :: DOMPos Source #

Defines an appending position in a document node.

domDocument :: DOM -> DOMNode Source #

Gets the document node for a DOM.

domQuirksSet :: DOMQuirks -> DOM -> DOM Source #

Sets the quirks mode for a document.

domQuirksGet :: DOM -> DOMQuirks Source #

Gets the quirks mode for a document.

domNewID :: DOM -> DOMNode -> (DOM, DOMID) Source #

Adds a new node to a DOM.

domGetNode :: DOM -> DOMID -> Maybe DOMNode Source #

Gets a node for a node ID.

domPutNode :: DOMID -> DOMNode -> DOM -> DOM Source #

Updates a node in the DOM.

domInsert :: DOMPos -> DOMID -> DOM -> DOM Source #

Inserts a node at a position.

domInsertNew :: DOMPos -> DOMNode -> DOM -> (DOM, DOMID) Source #

Inserts a node at a position.

domAppend :: DOMID -> DOMID -> DOM -> DOM Source #

Appends a node ID to a node.

domAppendNew :: DOMID -> DOMNode -> DOM -> DOM Source #

Appends a node to a node.

domElementHasAttr :: DOMNode -> BS -> Bool Source #

Determines if a node has a named attribute.

domElementFindAttr :: DOMNode -> BS -> Maybe DOMAttr Source #

Finds an attribute for an element.

domElementAttrValue :: DOMNode -> BS -> Maybe BS Source #

Finds an attribute value for an element.

domAttrEq :: Seq DOMAttr -> Seq DOMAttr -> Bool Source #

Determine if two sequences of attributes are equivalent.

domAttrMerge :: DOMID -> Seq DOMAttr -> DOM -> DOM Source #

Merges attributes into an existing node.

domAttrSet :: Seq DOMAttr -> Set DOMAttr Source #

Converta an attribute sequence to an attribute set in order to be insensitive to order.

domMatch :: DOM -> DOMID -> DOMID -> Bool Source #

Detmermines if two elements match.

domLastChild :: DOM -> DOMID -> Maybe DOMID Source #

Returns the last child of a node if it exists.

domMapID :: DOM -> [DOMID] -> [DOMNode] Source #

Converts a list of node IDs to nodes.

domFindParent :: DOM -> DOMID -> Maybe DOMID Source #

Finds the parent node for a node.

domSetParent :: DOMID -> DOMID -> DOM -> DOM Source #

Sets the parent for a node.

domMapChild :: DOMID -> (Seq DOMID -> Seq DOMID) -> DOM -> DOM Source #

Maps a function over children of a node.

domRemoveChild :: DOMID -> DOMID -> DOM -> DOM Source #

Removes a child from a node.

domRemoveChildren :: DOMID -> DOM -> DOM Source #

Removes all the children from a node.

domMove :: DOMID -> DOMID -> DOM -> DOM Source #

Moves a node to another parent.

domMoveChildren :: DOMID -> DOMID -> DOM -> DOM Source #

Moves the children of a node to another node.

domChildren :: DOM -> DOMID -> Seq DOMID Source #

Gets the children of a node.

domHasChild :: DOM -> DOMID -> DOMID -> Bool Source #

Determines if a node has a specific child.

domNodeID :: DOMNode -> DOMID Source #

Gets the id for a node.

domNodeParent :: DOMNode -> DOMID Source #

Gets the parent for a node.

domNodeIsHTML :: DOMNode -> Bool Source #

Detmermines if a node is in the HTML namespace.

domNodeIsSVG :: DOMNode -> Bool Source #

Detmermines if a node is in the SVG namespace.

domNodeIsMathML :: DOMNode -> Bool Source #

Detmermines if a node is in the MathML namespace.

domNodeIsDocument :: DOMNode -> Bool Source #

Detmermines if a node is a document node.

domNodeIsFragment :: DOMNode -> Bool Source #

Detmermines if a node is a document fragment node.

domNodeIsElement :: DOMNode -> Bool Source #

Detmermines if a node is an element node.

domNodeIsTemplate :: DOMNode -> Bool Source #

Detmermines if a node is a template node.

domNodeIsHtmlElement :: DOMNode -> Bool Source #

Detmermines if a node is an HTML element node.

domNodeIsText :: DOMNode -> Bool Source #

Detmermines if a node is a text node.

domNodeElementName :: DOMNode -> BS Source #

Gets the name for an element node.

domNodeElementNamespace :: DOMNode -> HTMLNamespace Source #

Gets the name for an element node.

domNodeType :: DOMNode -> DOMType Source #

Gets the type for an element node.

domTypesHTML :: [BS] -> [DOMType] Source #

Gets a list of HTML types for element names.

domTypesMathML :: [BS] -> [DOMType] Source #

Gets a list of MathML types for element names.

domTypesSVG :: [BS] -> [DOMType] Source #

Gets a list of SVG types for element names.

domRender :: DOM -> BS Source #

Renders the DOM.