Definition
Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml.Nodes Inheritance: CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Summary
Represents a mutable XML processing instruction. This class cannot be inherited.Usage
XmlProcessingInstructionNode is a processing instruction such as <?print copies="2"?>. Target is the name after <?, and Data is the rest, which can be null. The data is free text; when it looks like attributes, that’s a convention of the application that reads it, and the tree doesn’t parse it.
Considerations
- The target can’t be
xmlin any letter case; that name is reserved for the XML declaration. Writing such a node throws anXmlException(“Processing instruction target cannot be ‘xml’.”). For the declaration, useXmlDeclarationNodeor let the writer add it. - The constructor rejects a
null, empty, or white-space target. XmlNode.Parsekeeps processing instructions inside the root element. Those before and after the root element, such as<?xml-stylesheet ...?>, aren’t part of the tree;XmlDocumentkeeps them and writes them back.- A processing instruction doesn’t contribute to
XmlElementNode.InnerText.
Constructors
.ctor
Initializes a new instance of the XmlProcessingInstructionNode class with the specified target and data.Syntax
Parameters
Exceptions
.ctor Inherited
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
.ctor Inherited
Inherited from
objectSyntax
Properties
Data
Gets or sets the data of this processing instruction.Syntax
Property Value
Type:string?
The text that follows the target, or null if the processing instruction has no data.
NamespaceUri Inherited Virtual
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Property Value
Type:string?
The namespace URI of the node. An element or an attribute in no namespace gives an empty string.
For a node that is not an element or an attribute, the value is always null,
and setting it has no effect.
Parent Inherited
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Property Value
Type:CloudNimble.Text.Xml.Nodes.XmlNode?
The element that holds this node as a child or as an attribute, or null if this
node has no parent.
Target
Gets or sets the target of this processing instruction.Syntax
Property Value
Type:string
The name that identifies the application to which the instruction is directed.
Remarks
A target that isnull, empty, or white space is rejected, by the constructor and when the property is set.
ValueKind Override
Syntax
Property Value
Type:CloudNimble.Text.Xml.XmlValueKind
ValueKind Inherited Abstract
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Property Value
Type:CloudNimble.Text.Xml.XmlValueKind
One of the enumeration values that indicates the kind of this node.
Methods
DeepClone Override
Syntax
Returns
Type:CloudNimble.Text.Xml.Nodes.XmlNode
DeepClone Inherited Abstract
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Returns
Type:CloudNimble.Text.Xml.Nodes.XmlNode
A new cloned instance of the current node. The clone has no parent.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
Parse Inherited
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Parameters
Returns
Type:CloudNimble.Text.Xml.Nodes.XmlNode
An XmlNode representation of the document element.
Exceptions
Remarks
Comments inside the document element are kept. The XML declaration and any comments or processing instructions outside the document element are not part of the returned tree.Parse Inherited
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Parameters
Returns
Type:CloudNimble.Text.Xml.Nodes.XmlNode
An XmlNode representation of the document element.
Exceptions
Remarks
Comments inside the document element are kept. The XML declaration and any comments or processing instructions outside the document element are not part of the returned tree.ParseValue Inherited
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Parameters
Returns
Type:CloudNimble.Text.Xml.Nodes.XmlNode
An XmlNode representation of the element (and nested nodes) read from the reader.
Exceptions
Remarks
When this method returns, the reader is positioned on the end tag of the element, or on the element itself if it is an empty-element tag. Comments are kept only if the reader reports them.ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
SetParent Inherited
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Parameters
ToString Override
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Returns
Type:string
The XML markup of this node, including its attributes and descendants. No XML declaration is added.
Exceptions
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
WriteTo Override
Syntax
Parameters
WriteTo Inherited Abstract
Inherited from
CloudNimble.Text.Xml.Nodes.XmlNodeSyntax
Parameters
Exceptions
Related APIs
- CloudNimble.Text.Xml.Nodes.XmlElementNode
- CloudNimble.Text.Xml.Nodes.XmlDeclarationNode
- CloudNimble.Text.Xml.Nodes.XmlNode
- CloudNimble.Text.Xml.Utf8XmlWriter