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

Element

mattt edited this page Oct 17, 2021 · 4 revisions

Element

public final class Element: Node 

Inheritance

Node

Initializers

init(name:attributes:)

public convenience init(name: String, attributes: [String: String] = [:]) 

init?(rawValue:)

public required init?(rawValue: UnsafeMutableRawPointer?) 

init(name:attributes:children:)

public convenience init(name: String, attributes: [String: String] = [:], @DOMBuilder children builder: () -> Node = { DocumentFragment() }) 

Properties

document

public var document: Document? 

name

public var name: String 

namespace

public var namespace: Namespace? 

namespaceDefinitions

public var namespaceDefinitions: [Namespace] 

Methods

append(sibling:)

public func append(sibling node: Node) 

prepend(sibling:)

public func prepend(sibling node: Node) 

replace(with:)

public func replace(with node: Node) 

insert(child:)

public func insert(child node: Node) 

wrap(inside:)

public func wrap(inside element: Element) 

remove()

public func remove() 

search(xpath:)

public func search(xpath: XPath.Expression) -> [Element] 

evaluate(xpath:)

public func evaluate(xpath: XPath.Expression) -> XPath.Object? 

search(xpath:)

public func search(xpath: XPath.Expression) -> [Element] 

evaluate(xpath:)

public func evaluate(xpath: XPath.Expression) -> XPath.Object? 
Types
Protocols
Global Functions
Extensions
Clone this wiki locally