3 /// Options used in `AEXMLDocument`
4 public struct AEXMLOptions {
6 /// Values used in XML Document header
7 public struct DocumentHeader {
8 /// Version value for XML Document header (defaults to 1.0).
9 public var version = 1.0
11 /// Encoding value for XML Document header (defaults to "utf-8").
12 public var encoding = "utf-8"
14 /// Standalone value for XML Document header (defaults to "no").
15 public var standalone = "no"
17 /// XML Document header
18 public var xmlString: String {
19 return "<?xml version=\"\(version)\" encoding=\"\(encoding)\" standalone=\"\(standalone)\"?>"
23 /// Settings used by `Foundation.XMLParser`
24 public struct ParserSettings {
25 /// Parser reports the namespaces and qualified names of elements. (defaults to `false`)
26 public var shouldProcessNamespaces = false
28 /// Parser reports the prefixes indicating the scope of namespace declarations. (defaults to `false`)
29 public var shouldReportNamespacePrefixes = false
31 /// Parser reports declarations of external entities. (defaults to `false`)
32 public var shouldResolveExternalEntities = false
34 /// Parser should trim whitespace from text nodes. (defaults to `true`)
35 public var shouldTrimWhitespace = true
38 /// Values used in XML Document header (defaults to `DocumentHeader()`)
39 public var documentHeader = DocumentHeader()
41 /// Settings used by `Foundation.XMLParser` (defaults to `ParserSettings()`)
42 public var parserSettings = ParserSettings()
44 /// Designated initializer - Creates and returns default `AEXMLOptions`.