In This Article

IXmlElementContext Interface

Provides the base requirements for resolved information about a XML element related to an IXmlContext.

public interface IXmlElementContext

Properties

AstNode

The IAstNode that defines the element, if known.

IAstNode? AstNode { get; }

Property Value

IAstNode

Remarks

This property may not be available if the element context was constructed via token scanning and the tokens are too far out of sync with the AST, which can be the case while editing is occurring.

Attributes

The dictionary of attributes for this element.

IDictionary<XmlQualifiedName, IXmlAttributeContext> Attributes { get; }

Property Value

IDictionary<XmlQualifiedName, IXmlAttributeContext>:

The dictionary of attributes for this element.

Remarks

The dictionary keys are the attribute qualified names and the values are IXmlAttributeContext objects.

EndTagSnapshotRange

The nullable TextSnapshotRange that specifies the range of the end tag, if there is one.

TextSnapshotRange? EndTagSnapshotRange { get; }

Property Value

TextSnapshotRange?

Remarks

This property may not be available if the element context was constructed via token scanning and the tokens are too far out of sync with the AST, which can be the case while editing is occurring.

Name

The name of the element.

string? Name { get; }

Property Value

string

Namespace

The namespace that defines the element.

string? Namespace { get; }

Property Value

string

NamespacePrefix

The prefix of the namespace that defines the element.

string? NamespacePrefix { get; }

Property Value

string

QualifiedName

The System.Xml.XmlQualifiedName that contains the element's qualified name.

XmlQualifiedName QualifiedName { get; }

Property Value

XmlQualifiedName

SchemaElement

The resolved System.Xml.Schema.XmlSchemaElement for this element, if known.

XmlSchemaElement? SchemaElement { get; }

Property Value

XmlSchemaElement

StartTagNameSnapshotRange

The TextSnapshotRange that specifies the range of the start tag name.

TextSnapshotRange? StartTagNameSnapshotRange { get; }

Property Value

TextSnapshotRange?

Extension Methods