Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Parser_Options

mattt edited this page Mar 27, 2020 · 3 revisions

Parser.Options

public struct Options: OptionSet

Inheritance

OptionSet, OptionSet

Initializers

init(rawValue:)

public init(rawValue: Int32)

init(rawValue:)

public init(rawValue: Int32)

init?(string:baseURL:encoding:options:)

public convenience init?(string: String, baseURL url: URL? = nil, encoding: String.Encoding = .utf8, options: Parser.Options = [.suppressWarnings, .suppressErrors, .relaxed]) throws

init?(string:baseURL:encoding:options:)

public convenience init?(string: String, baseURL url: URL? = nil, encoding: String.Encoding = .utf8, options: Parser.Options = [.suppressWarnings, .suppressErrors, .relaxed]) throws

init?(string:options:)

public convenience init?(string: String, options: Parser.Options = [.suppressWarnings, .suppressErrors, .relaxed]) throws

init?(string:options:)

public convenience init?(string: String, options: Parser.Options = [.suppressWarnings, .suppressErrors, .relaxed]) throws

Properties

bigLineNumbers

Store big lines numbers in text PSVI field

let bigLineNumbers = Options(XML_PARSE_BIG_LINES)

compact

Compact small text nodes

let compact = Options(HTML_PARSE_COMPACT)

compact

Compact small text nodes.

let compact = Options(XML_PARSE_COMPACT)

Warning: Modification of the resulting tree isn't allowed

forbidNetworkAccess

Forbid network access

let forbidNetworkAccess = Options(XML_PARSE_NONET)

forbidNetworkAccess

Forbid network access

let forbidNetworkAccess = Options(HTML_PARSE_NONET)

ignoreDocumentEncodingHint

Ignore internal document encoding hint

let ignoreDocumentEncodingHint = Options(HTML_PARSE_IGNORE_ENC)

ignoreEncodingHint

Ignore internal document encoding hint

let ignoreEncodingHint = Options(XML_PARSE_IGNORE_ENC)

implementXIncludeSubstitution

Implement XInclude substituion

let implementXIncludeSubstitution = Options(XML_PARSE_XINCLUDE)

loadDTDExternalSubset

Load external subset

let loadDTDExternalSubset = Options(XML_PARSE_DTDLOAD)

mergeCDATA

Merge CDATA as text nodes

let mergeCDATA = Options(XML_PARSE_NOCDATA)

noContextDictionaryReuse

Do not reuse the context dictionary

let noContextDictionaryReuse = Options(XML_PARSE_NODICT)

noDefaultDTD

Do not default a doctype if not found

let noDefaultDTD = Options(HTML_PARSE_NODEFDTD)

noXIncludeBaseURIFixup

Do not fixup XINCLUDE xml:base uris

let noXIncludeBaseURIFixup = Options(XML_PARSE_NOBASEFIX)

noXIncludeDelimiterNodes

Do not generate XINCLUDE START/END nodes

let noXIncludeDelimiterNodes = Options(XML_PARSE_NOXINCNODE)

omitImpliedTags

Do not add implied html/body... elements

let omitImpliedTags = Options(HTML_PARSE_NOIMPLIED)

pedantic

Pedantic error reporting

let pedantic = Options(XML_PARSE_PEDANTIC)

pedantic

Pedantic error reporting

let pedantic = Options(HTML_PARSE_PEDANTIC)

rawValue

var rawValue: Int32

rawValue

var rawValue: Int32

relaxHardcodedLimits

Relax any hardcoded limit from the parser

let relaxHardcodedLimits = Options(XML_PARSE_HUGE)

relaxed

Relaxed parsing

let relaxed = Options(HTML_PARSE_RECOVER)

relaxed

Relaxed parser

let relaxed = Options(XML_PARSE_RECOVER)

removeBlankNodes

Remove blank nodes

let removeBlankNodes = Options(HTML_PARSE_NOBLANKS)

removeBlankNodes

Remove blank nodes

let removeBlankNodes = Options(XML_PARSE_NOBLANKS)

removeRedundantNamespaceDeclarations

Remove redundant namespaces declarations

let removeRedundantNamespaceDeclarations = Options(XML_PARSE_NSCLEAN)

substituteEntities

Substitute entities.

let substituteEntities = Options(XML_PARSE_NOENT)

suppressErrors

Suppress errors

let suppressErrors = Options(HTML_PARSE_NOERROR)

suppressErrors

Suppress errors

let suppressErrors = Options(XML_PARSE_NOERROR)

suppressWarnings

Suppress warnings

let suppressWarnings = Options(XML_PARSE_NOWARNING)

suppressWarnings

Suppress warnings

let suppressWarnings = Options(HTML_PARSE_NOWARNING)

useDefaultDTDAttributes

Use default DTD attributes

let useDefaultDTDAttributes = Options(XML_PARSE_DTDATTR)

useSAX1Interface

Use the SAX1 interface

let useSAX1Interface = Options(XML_PARSE_SAX1)

validateDTD

Validate with the DTD

let validateDTD = Options(XML_PARSE_DTDVALID)
Types
Protocols
Global Functions
Extensions

Clone this wiki locally