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
nodeType
of aProcessingInstruction
is.processingInstruction
.Declaration
Swift
public static let nodeType: NodeType = .processingInstruction
-
The
nodeName
of aProcessingInstruction
is itstarget
.Declaration
Swift
public final var nodeName: String
-
The
nodeValue
of aProcessingInstruction
is itsdata
.Declaration
Swift
public final var nodeValue: String?
-
The
attributes
dictionary of aProcessingInstruction
isnil
.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
target
The target of this processing instruction. XML defines this as being the first token following the
<?
that begins the processing instruction.data
The 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)