gi-glib-2.0.30: GLib bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GLib.Structs.MarkupParser

Description

Any of the fields in MarkupParser can be Nothing, in which case they will be ignored. Except for the error function, any of these callbacks can set an error; in particular the MarkupErrorUnknownElement, MarkupErrorUnknownAttribute, and MarkupErrorInvalidContent errors are intended to be set from these callbacks. If you set an error from a callback, markupParseContextParse will report that error back to its caller.

Synopsis

Exported types

newtype MarkupParser Source #

Memory-managed wrapper type.

Constructors

MarkupParser (ManagedPtr MarkupParser) 

Instances

Instances details
Eq MarkupParser Source # 
Instance details

Defined in GI.GLib.Structs.MarkupParser

BoxedPtr MarkupParser Source # 
Instance details

Defined in GI.GLib.Structs.MarkupParser

CallocPtr MarkupParser Source # 
Instance details

Defined in GI.GLib.Structs.MarkupParser

ManagedPtrNewtype MarkupParser Source # 
Instance details

Defined in GI.GLib.Structs.MarkupParser

Methods

toManagedPtr :: MarkupParser -> ManagedPtr MarkupParser

tag ~ 'AttrSet => Constructible MarkupParser tag Source # 
Instance details

Defined in GI.GLib.Structs.MarkupParser

Methods

new :: MonadIO m => (ManagedPtr MarkupParser -> MarkupParser) -> [AttrOp MarkupParser tag] -> m MarkupParser

newZeroMarkupParser :: MonadIO m => m MarkupParser Source #

Construct a MarkupParser struct initialized to zero.

Methods

Properties

endElement

Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <empty/>.

clearMarkupParserEndElement :: MonadIO m => MarkupParser -> m () Source #

Set the value of the “end_element” field to Nothing. When overloading is enabled, this is equivalent to

clear #endElement

getMarkupParserEndElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures) Source #

Get the value of the “end_element” field. When overloading is enabled, this is equivalent to

get markupParser #endElement

setMarkupParserEndElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserEndElementFieldCallback -> m () Source #

Set the value of the “end_element” field. When overloading is enabled, this is equivalent to

set markupParser [ #endElement := value ]

error

Callback to invoke when an error occurs.

clearMarkupParserError :: MonadIO m => MarkupParser -> m () Source #

Set the value of the “error” field to Nothing. When overloading is enabled, this is equivalent to

clear #error

getMarkupParserError :: MonadIO m => MarkupParser -> m (Maybe MarkupParserErrorFieldCallback_WithClosures) Source #

Get the value of the “error” field. When overloading is enabled, this is equivalent to

get markupParser #error

setMarkupParserError :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserErrorFieldCallback -> m () Source #

Set the value of the “error” field. When overloading is enabled, this is equivalent to

set markupParser [ #error := value ]

passthrough

Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the MarkupParseFlagsTreatCdataAsText flag is not set, this function is also called for CDATA marked sections.

clearMarkupParserPassthrough :: MonadIO m => MarkupParser -> m () Source #

Set the value of the “passthrough” field to Nothing. When overloading is enabled, this is equivalent to

clear #passthrough

getMarkupParserPassthrough :: MonadIO m => MarkupParser -> m (Maybe MarkupParserPassthroughFieldCallback_WithClosures) Source #

Get the value of the “passthrough” field. When overloading is enabled, this is equivalent to

get markupParser #passthrough

setMarkupParserPassthrough :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserPassthroughFieldCallback -> m () Source #

Set the value of the “passthrough” field. When overloading is enabled, this is equivalent to

set markupParser [ #passthrough := value ]

startElement

Callback to invoke when the opening tag of an element is seen. The callback's attributeNames and attributeValues parameters are Nothing-terminated.

clearMarkupParserStartElement :: MonadIO m => MarkupParser -> m () Source #

Set the value of the “start_element” field to Nothing. When overloading is enabled, this is equivalent to

clear #startElement

getMarkupParserStartElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures) Source #

Get the value of the “start_element” field. When overloading is enabled, this is equivalent to

get markupParser #startElement

setMarkupParserStartElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserStartElementFieldCallback -> m () Source #

Set the value of the “start_element” field. When overloading is enabled, this is equivalent to

set markupParser [ #startElement := value ]

text

Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the MarkupParseFlagsTreatCdataAsText flag is set, this function is also called for the content of CDATA marked sections.

clearMarkupParserText :: MonadIO m => MarkupParser -> m () Source #

Set the value of the “text” field to Nothing. When overloading is enabled, this is equivalent to

clear #text

getMarkupParserText :: MonadIO m => MarkupParser -> m (Maybe MarkupParserTextFieldCallback_WithClosures) Source #

Get the value of the “text” field. When overloading is enabled, this is equivalent to

get markupParser #text

setMarkupParserText :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m () Source #

Set the value of the “text” field. When overloading is enabled, this is equivalent to

set markupParser [ #text := value ]