HTMLDocument
public class HTMLDocument: XMLDocument
HTML document which can be searched and queried.
-
HTML title of current document
Declaration
Swift
public var title: String? -
HTML head element of current document
Declaration
Swift
public var head: XMLElement? -
HTML body element of current document
Declaration
Swift
public var body: XMLElement?
-
Creates and returns an instance of HTMLDocument from an HTML string, throwing XMLError if an error occured while parsing the HTML.
Declaration
Swift
public convenience init(string: String, encoding: NSStringEncoding = NSUTF8StringEncoding) throwsParameters
stringThe HTML string.
encodingThe string encoding.
Return Value
An
HTMLDocumentwith the contents of the specified HTML string. -
Creates and returns an instance of HTMLDocument from HTML data, throwing XMLError if an error occured while parsing the HTML.
Declaration
Swift
public convenience init(data: NSData) throwsParameters
dataThe HTML data.
Return Value
An
HTMLDocumentwith the contents of the specified HTML string. -
Creates and returns an instance of HTMLDocument from C char array, throwing XMLError if an error occured while parsing the HTML.
Declaration
Swift
public convenience init(cChars: [CChar]) throwsParameters
cCharscChars The HTML data as C char array
Return Value
An
HTMLDocumentwith the contents of the specified HTML string.
HTMLDocument Class Reference