c14n-0.1.0.2: Bindings to the c14n implementation in libxml.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.XML.C14N.LibXML

Description

Bindings to libxml types and functions required for the c14n implementation. See http://xmlsoft.org/html/libxml-c14n.html

Synopsis

libxml2 types

data LibXMLDoc Source #

XML documents

data LibXMLNodeSet Source #

XML node sets

type LibXMLChar = Word8 Source #

XML strings

data LibXMLXPathCtx Source #

XML XPath contexts

data LibXMLXPathObj Source #

XML XPath objects

Memory-related functions

freeXml :: Ptr a -> IO () Source #

Free an XML object.

Parsing

xml_opt_recover :: CInt Source #

Recover on errors.

xml_opt_noent :: CInt Source #

Substitute entities.

xml_opt_dtdload :: CInt Source #

Load the external subset.

xml_opt_dtdattr :: CInt Source #

Default DTD attributes.

xml_opt_dtdvalid :: CInt Source #

Validate with the DTD.

xml_opt_noerror :: CInt Source #

Suppress error reports.

xml_opt_nowarning :: CInt Source #

Suppress warning reports.

xml_opt_pedantic :: CInt Source #

Pedantic error reporting.

xml_opt_noblanks :: CInt Source #

Remove blank nodes.

xml_opt_sax1 :: CInt Source #

Use the SAX1 interface internally.

xml_opt_xinclude :: CInt Source #

Implement XInclude substitution.

xml_opt_nonet :: CInt Source #

Forbid network access.

xml_opt_nodict :: CInt Source #

Do not reuse the context dictionary.

xml_opt_nsclean :: CInt Source #

Remove redundant namespaces declarations.

xml_opt_nocdata :: CInt Source #

Merge CDATA as text nodes.

xml_opt_noxincnode :: CInt Source #

Do not generate XINCLUDE START/END nodes.

xml_opt_compact :: CInt Source #

Compact small text nodes; no modification of the tree allowed afterwards (will probably crash if you try to modify the tree)

xml_opt_old10 :: CInt Source #

Parse using XML-1.0 before update 5.

xml_opt_nobasefix :: CInt Source #

Do not fixup XINCLUDE xml:base uris.

xml_opt_huge :: CInt Source #

Relax any hardcoded limit from the parser.

xml_opt_oldsax :: CInt Source #

Parse using SAX2 interface before 2.7.0.

xml_opt_ignore_env :: CInt Source #

Ignore internal document encoding hint.

xml_opt_big_lines :: CInt Source #

Store big lines numbers in text PSVI field.

xmlReadMemory :: CString -> CInt -> CString -> CString -> CInt -> IO (Ptr LibXMLDoc) Source #

Parses an XML document from a textual representation held in memory.

xmlFreeDoc :: FunPtr (Ptr LibXMLDoc -> IO ()) Source #

Free an XML document.

XML canonicalisation

c14n_1_0 :: CInt Source #

Original C14N 1.0 specification.

c14n_exclusive_1_0 :: CInt Source #

Exclusive C14N 1.0 specification.

c14n_1_1 :: CInt Source #

C14N 1.1 specification.

xmlC14NDocDumpMemory Source #

Arguments

:: Ptr LibXMLDoc

The XML document to canonicalise.

-> Ptr LibXMLNodeSet

The nodes set to be included in the canonicalised output.

-> CInt

The canonicalisation mode.

-> Ptr (Ptr LibXMLChar)

A list of inclusive namespace prefixes

-> CInt

A boolean value indicating whether comments should be included in the result or not.

-> Ptr (Ptr LibXMLChar)

A memory address to which the output should be written.

-> IO CInt 

Writes the canonicalised representation of an XML document to memory.

XPath

xmlXPathNewContext :: Ptr LibXMLDoc -> IO (Ptr LibXMLXPathCtx) Source #

Creates a new XPath context for the given document.

xmlXPathEval :: Ptr LibXMLChar -> Ptr LibXMLXPathCtx -> IO (Ptr LibXMLXPathObj) Source #

xmlXPathEval pathPtr ctxPtr evaluates the XPath location path pointed at by pathPtr in the XPath context pointed at by ctxPtr.