XmlElementSyntax Class
An element written with a start tag and an end tag, and whatever stands between them.
public sealed class XmlElementSyntax : XmlNodeSyntax- Inheritance
XmlNodeSyntaxXmlElementSyntax
Properties
| Name | Description |
|---|---|
| Attributes | Gets the attributes the start tag declares. |
| Content | |
| EndTag | |
| Name | Gets the name the start tag declares. |
| StartTag |
Attributes
XmlElementSyntax.csGets the attributes the start tag declares.
public SyntaxList<XmlAttributeSyntax> Attributes { get; }Property value
Content
XmlElementSyntax.csEndTag
XmlElementSyntax.csStartTag
XmlElementSyntax.csMethods
| Name | Description |
|---|---|
| Accept(XmlSyntaxVisitor) | |
| Accept<TResult>(XmlSyntaxVisitor<TResult>) | |
| GetAttribute(string) | Gets the first attribute called name, or null when there is none. |
| GetInnerText() | Gets the text between the two tags, exactly as it was written. |
| Update(XmlElementStartTagSyntax, SyntaxList<XmlNodeSyntax>, XmlElementEndTagSyntax?) | Returns this node with the given parts, or itself when nothing changed. |
| WithContent(SyntaxList<XmlNodeSyntax>) | |
| WithEndTag(XmlElementEndTagSyntax?) | |
| WithInnerText(string) | Returns this element with text as its only content. |
| WithName(string) | Returns this element renamed, in both of its tags. |
| WithStartTag(XmlElementStartTagSyntax) |
Accept overloads
Accept(XmlSyntaxVisitor)
XmlElementSyntax.cspublic override void Accept(XmlSyntaxVisitor visitor)Parameters
visitorXmlSyntaxVisitor
No documentation is available.
Accept<TResult>(XmlSyntaxVisitor<TResult>)
XmlElementSyntax.cspublic override TResult? Accept<TResult>(XmlSyntaxVisitor<TResult> visitor)No documentation is available.
GetAttribute(string)
XmlElementSyntax.csGets the first attribute called name, or null when there is none.
public XmlAttributeSyntax? GetAttribute(string name)GetInnerText()
XmlElementSyntax.csUpdate(XmlElementStartTagSyntax, SyntaxList<XmlNodeSyntax>, XmlElementEndTagSyntax?)
XmlElementSyntax.csReturns this node with the given parts, or itself when nothing changed.
public XmlElementSyntax Update(XmlElementStartTagSyntax startTag, SyntaxList<XmlNodeSyntax> content, XmlElementEndTagSyntax? endTag)Parameters
startTagXmlElementStartTagSyntaxcontentSyntaxList<XmlNodeSyntax>endTagXmlElementEndTagSyntax?
Returns
WithContent(SyntaxList<XmlNodeSyntax>)
XmlElementSyntax.cspublic XmlElementSyntax WithContent(SyntaxList<XmlNodeSyntax> content)No documentation is available.
WithEndTag(XmlElementEndTagSyntax?)
XmlElementSyntax.cspublic XmlElementSyntax WithEndTag(XmlElementEndTagSyntax? endTag)No documentation is available.
WithInnerText(string)
XmlElementSyntax.csReturns this element with text as its only content.
public XmlElementSyntax WithInnerText(string text)WithName(string)
XmlElementSyntax.csReturns this element renamed, in both of its tags.
public XmlElementSyntax WithName(string name)WithStartTag(XmlElementStartTagSyntax)
XmlElementSyntax.cspublic XmlElementSyntax WithStartTag(XmlElementStartTagSyntax startTag)No documentation is available.