XmlAttributeSyntax Class

An attribute of a tag: a name, an equals sign, and a quoted value.

public sealed class XmlAttributeSyntax : XmlSyntaxNode
Inheritance
XmlSyntaxNode XmlAttributeSyntax

Properties

NameDescription
EndQuoteToken
EqualsToken
NameGets the name of the attribute.
NameToken
StartQuoteToken
ValueGets the value of the attribute as an XML processor reads it.
ValueToken
public SyntaxToken EndQuoteToken { get; }

Property value

SyntaxToken

No documentation is available.

public SyntaxToken EqualsToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the name of the attribute.

public string Name { get; }

Property value

string

public SyntaxToken NameToken { get; }

Property value

SyntaxToken

No documentation is available.

StartQuoteToken

XmlAttributeSyntax.cs
public SyntaxToken StartQuoteToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the value of the attribute as an XML processor reads it.

public string Value { get; }

Property value

string

Remarks

Character references and the predefined entities are resolved, and each tab and line break becomes a space (XML 1.0 §3.3.3). A reference to any other entity is left as written.

public SyntaxToken ValueToken { get; }

Property value

SyntaxToken

No documentation is available.

Methods

NameDescription
Accept(XmlSyntaxVisitor)
Accept<TResult>(XmlSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken)Returns this node with the given parts, or itself when nothing changed.
WithEndQuoteToken(SyntaxToken)
WithEqualsToken(SyntaxToken)
WithName(string)Returns this attribute renamed.
WithNameToken(SyntaxToken)
WithStartQuoteToken(SyntaxToken)
WithValue(string)Returns this attribute carrying a different value, escaped for the quote character it is written with.
WithValueToken(SyntaxToken)

Accept overloads

Accept(XmlSyntaxVisitor)

XmlAttributeSyntax.cs
public override void Accept(XmlSyntaxVisitor visitor)
Parameters
visitor XmlSyntaxVisitor

No documentation is available.

Accept<TResult>(XmlSyntaxVisitor<TResult>)

XmlAttributeSyntax.cs
public override TResult? Accept<TResult>(XmlSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor XmlSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken)

XmlAttributeSyntax.cs

Returns this node with the given parts, or itself when nothing changed.

public XmlAttributeSyntax Update(SyntaxToken nameToken, SyntaxToken equalsToken, SyntaxToken startQuoteToken, SyntaxToken valueToken, SyntaxToken endQuoteToken)

Parameters

nameToken SyntaxToken
equalsToken SyntaxToken
startQuoteToken SyntaxToken
valueToken SyntaxToken
endQuoteToken SyntaxToken

Returns

XmlAttributeSyntax

WithEndQuoteToken(SyntaxToken)

XmlAttributeSyntax.cs
public XmlAttributeSyntax WithEndQuoteToken(SyntaxToken endQuoteToken)

Parameters

endQuoteToken SyntaxToken

Returns

XmlAttributeSyntax

No documentation is available.

WithEqualsToken(SyntaxToken)

XmlAttributeSyntax.cs
public XmlAttributeSyntax WithEqualsToken(SyntaxToken equalsToken)

Parameters

equalsToken SyntaxToken

Returns

XmlAttributeSyntax

No documentation is available.

WithName(string)

XmlAttributeSyntax.cs

Returns this attribute renamed.

public XmlAttributeSyntax WithName(string name)

Parameters

name string

Returns

XmlAttributeSyntax

Exceptions

ArgumentNullException
name is null.

WithNameToken(SyntaxToken)

XmlAttributeSyntax.cs
public XmlAttributeSyntax WithNameToken(SyntaxToken nameToken)

Parameters

nameToken SyntaxToken

Returns

XmlAttributeSyntax

No documentation is available.

WithStartQuoteToken(SyntaxToken)

XmlAttributeSyntax.cs
public XmlAttributeSyntax WithStartQuoteToken(SyntaxToken startQuoteToken)

Parameters

startQuoteToken SyntaxToken

Returns

XmlAttributeSyntax

No documentation is available.

WithValue(string)

XmlAttributeSyntax.cs

Returns this attribute carrying a different value, escaped for the quote character it is written with.

public XmlAttributeSyntax WithValue(string value)

Parameters

value string

Returns

XmlAttributeSyntax

Exceptions

ArgumentNullException
value is null.

WithValueToken(SyntaxToken)

XmlAttributeSyntax.cs
public XmlAttributeSyntax WithValueToken(SyntaxToken valueToken)

Parameters

valueToken SyntaxToken

Returns

XmlAttributeSyntax

No documentation is available.