DDXMLDocument
extension DDXMLDocument
Undocumented
-
Canonicalization modes from xmlC14NMode
XML_C14N_1_0 = 0 : Original C14N 1.0 spec XML_C14N_EXCLUSIVE_1_0 = 1 : Exclusive C14N 1.0 spec XML_C14N_1_1 = 2 : C14N 1.1 spec
See moreDeclaration
Swift
enum CanonicalizationMode
-
Canonicalize DDXMLDocument using libxml2’ xmlC14NDocDumpMemory
Creates the canonized image of given XML document into String. For details see
Canonical XML
(http://www.w3.org/TR/xml-c14n) orExclusive XML Canonicalization
(http://www.w3.org/TR/xml-exc-c14n)Declaration
Swift
func canonicalize(nodes: [DDXMLNode] = [], mode: CanonicalizationMode, inclusive namespaces: [String] = [], comments: Bool = false) -> String?
Parameters
nodes
the nodes set to be included in the canonized image or empty list if all document nodes should be included. Default: []
mode
the c14n mode (@see
CanonicalizationMode
)namespaces
the list of inclusive namespace prefixes or empty list if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
comments
include comments in the result. Default: false
Return Value
the canonicalized document [or set to be included nodes] or nil when failed