ProcessingInstruction
public final class ProcessingInstruction: LeafNode
The ProcessingInstruction class represents a processing instruction
, used
in XML as a way to keep processor-secific information in the text of the
document.
-
The
nodeTypeof aProcessingInstructionis.processingInstruction.Declaration
Swift
public static let nodeType: NodeType = .processingInstruction -
The
nodeNameof aProcessingInstructionis itstarget.Declaration
Swift
public final var nodeName: String -
The
nodeValueof aProcessingInstructionis itsdata.Declaration
Swift
public final var nodeValue: String? -
The
attributesdictionary of aProcessingInstructionisnil.Declaration
Swift
public final let attributes: [String : String]? = nil
-
The target of this processing instruction. XML defines this as being the first token following the
<?that begins the processing instruction.Declaration
Swift
public final var target: String -
The content of this processing instruction. This is from the first non-whitespace character after the target to the character immediately preceding the
?>.Declaration
Swift
public final var data: String?
-
Creates a new `ProcessingInstruction’ node.
Declaration
Swift
public init(target: String, data: String?)Parameters
targetThe target of this processing instruction. XML defines this as being the first token following the
<?that begins the processing instruction.dataThe content of this processing instruction. This is from the first non-whitespace character after the target to the character immediately preceding the
?>.
-
A processing instruction node calls
visit(self)on the visitor.Declaration
Swift
public func accept(_ visitor: Visitor)
View on GitHub
Install in Dash
ProcessingInstruction Class Reference