XmlDocumentSyntax Class
Everything a document is made of, in the order it was written.
public sealed class XmlDocumentSyntax : XmlSyntaxNode, IXPathNavigable- Inheritance
XmlSyntaxNodeXmlDocumentSyntax- Implements
Properties
| Name | Description |
|---|---|
| EndOfFileToken | |
| Nodes |
EndOfFileToken
XmlDocumentSyntax.csNodes
XmlDocumentSyntax.csMethods
| Name | Description |
|---|---|
| Accept(XmlSyntaxVisitor) | |
| Accept<TResult>(XmlSyntaxVisitor<TResult>) | |
| CreateNavigator() | Returns an XPath view of this document, backed by its own nodes. |
| NormalizeWhitespace() | Returns this document laid out again by Formatter. |
| ReplaceNode(string, Func<XmlSyntaxNode, XmlSyntaxNode>) | Returns this document with the node xpath selects put through updateNode. |
| ReplaceNode(string, IXmlNamespaceResolver?, Func<XmlSyntaxNode, XmlSyntaxNode>) | Returns this document with the node xpath selects put through updateNode. |
| SelectNodes(string, IXmlNamespaceResolver?) | |
| Update(SyntaxList<XmlNodeSyntax>, SyntaxToken) | Returns this node with the given parts, or itself when nothing changed. |
| WithEndOfFileToken(SyntaxToken) | |
| WithNodes(SyntaxList<XmlNodeSyntax>) |
Accept overloads
Accept(XmlSyntaxVisitor)
XmlDocumentSyntax.cspublic override void Accept(XmlSyntaxVisitor visitor)Parameters
visitorXmlSyntaxVisitor
No documentation is available.
Accept<TResult>(XmlSyntaxVisitor<TResult>)
XmlDocumentSyntax.cspublic override TResult? Accept<TResult>(XmlSyntaxVisitor<TResult> visitor)No documentation is available.
NormalizeWhitespace()
XmlDocumentSyntax.csReturns this document laid out again by Formatter.
public XmlDocumentSyntax NormalizeWhitespace()Returns
ReplaceNode overloads
ReplaceNode(string, Func<XmlSyntaxNode, XmlSyntaxNode>)
XmlDocumentSyntax.csReturns this document with the node xpath selects put through updateNode.
public XmlDocumentSyntax ReplaceNode(string xpath, Func<XmlSyntaxNode, XmlSyntaxNode> updateNode)Parameters
xpathstringupdateNodeFunc<XmlSyntaxNode, XmlSyntaxNode>
Returns
Exceptions
ArgumentNullExceptionxpathorupdateNodeisnull.InvalidOperationException- Nothing matches
xpath.
ReplaceNode(string, IXmlNamespaceResolver?, Func<XmlSyntaxNode, XmlSyntaxNode>)
XmlDocumentSyntax.csReturns this document with the node xpath selects put through updateNode.
public XmlDocumentSyntax ReplaceNode(string xpath, IXmlNamespaceResolver? namespaceResolver, Func<XmlSyntaxNode, XmlSyntaxNode> updateNode)Parameters
xpathstringnamespaceResolverIXmlNamespaceResolver?updateNodeFunc<XmlSyntaxNode, XmlSyntaxNode>
Returns
Exceptions
ArgumentNullExceptionxpathorupdateNodeisnull.InvalidOperationException- Nothing matches
xpath.
SelectNodes(string, IXmlNamespaceResolver?)
XmlDocumentSyntax.cspublic override IEnumerable<XPathNavigator> SelectNodes(string xpath, IXmlNamespaceResolver? namespaceResolver)Parameters
xpathstringnamespaceResolverIXmlNamespaceResolver?
Returns
Exceptions
ArgumentNullExceptionxpathisnull.
Update(SyntaxList<XmlNodeSyntax>, SyntaxToken)
XmlDocumentSyntax.csReturns this node with the given parts, or itself when nothing changed.
public XmlDocumentSyntax Update(SyntaxList<XmlNodeSyntax> nodes, SyntaxToken endOfFileToken)WithEndOfFileToken(SyntaxToken)
XmlDocumentSyntax.cspublic XmlDocumentSyntax WithEndOfFileToken(SyntaxToken endOfFileToken)No documentation is available.
WithNodes(SyntaxList<XmlNodeSyntax>)
XmlDocumentSyntax.cspublic XmlDocumentSyntax WithNodes(SyntaxList<XmlNodeSyntax> nodes)No documentation is available.