Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides a mid-level interface to libxml's implementation of c14n, i.e. XML canonicalisation.
Synopsis
- c14n_1_0 :: CInt
- c14n_exclusive_1_0 :: CInt
- c14n_1_1 :: CInt
- c14n :: [CInt] -> CInt -> [ByteString] -> Bool -> Maybe ByteString -> ByteString -> IO ByteString
- xml_opt_recover :: CInt
- xml_opt_noent :: CInt
- xml_opt_dtdload :: CInt
- xml_opt_dtdattr :: CInt
- xml_opt_dtdvalid :: CInt
- xml_opt_noerror :: CInt
- xml_opt_nowarning :: CInt
- xml_opt_pedantic :: CInt
- xml_opt_noblanks :: CInt
- xml_opt_sax1 :: CInt
- xml_opt_xinclude :: CInt
- xml_opt_nonet :: CInt
- xml_opt_nodict :: CInt
- xml_opt_nsclean :: CInt
- xml_opt_nocdata :: CInt
- xml_opt_noxincnode :: CInt
- xml_opt_compact :: CInt
- xml_opt_old10 :: CInt
- xml_opt_nobasefix :: CInt
- xml_opt_huge :: CInt
- xml_opt_oldsax :: CInt
- xml_opt_ignore_env :: CInt
- xml_opt_big_lines :: CInt
- parseXml :: [CInt] -> ByteString -> IO (ForeignPtr LibXMLDoc)
Canonicalisation
c14n_exclusive_1_0 :: CInt Source #
Exclusive C14N 1.0 specification.
c14n :: [CInt] -> CInt -> [ByteString] -> Bool -> Maybe ByteString -> ByteString -> IO ByteString Source #
c14n
parseOpts mode nsPrefixes keepComments xPathLocation input
canonicalises the document given by input
, which is parsed using options
specified by parseOpts
. The mode
argument deteremines the
canonicalisation mode to use. nsPrefixes
gives a (potentially empty)
list of namespace prefixes which is used when mode
is
c14n_exclusive_1_0
. If keepComments
is True
, all comments are kept
in the output. xPathLocation
is used to select a set of nodes that should
be included in the canonicalised result.
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.
parseXml :: [CInt] -> ByteString -> IO (ForeignPtr LibXMLDoc) Source #
parseXml
parseOpts text
parses text
into an XML document using
libxml according to options given by parseOpts
.