IXmlContext Interface
Provides the base requirements for information about the XML context of a certain offset within an ITextSnapshot.
public interface IXmlContext
Properties
ElementHierarchy
A read-only list of IXmlElementContext objects that describes the element hierarchy.
IList<IXmlElementContext>? ElementHierarchy { get; }
Property Value
Remarks
The element hierarchy is the list of parent elements that contain the current offset.
InitializationSnapshotRange
The TextSnapshotRange with which the context was initialized.
NamespaceDeclarations
The mapping dictionary of namespace to namespace prefixes that are declared at the context.
IDictionary<string, string>? NamespaceDeclarations { get; }
Property Value
Remarks
The dictionary keys are namespaces and the values are namespace prefixes.
SchemaResolver
The IXmlSchemaResolver to use.
SnapshotOffset
The TextSnapshotOffset for which this context was created.
TargetAttribute
The IXmlAttributeContext that contains context information related to the target attribute.
IXmlAttributeContext? TargetAttribute { get; }
Property Value
Remarks
This property is only populated if the context is related to an attribute.
TargetElement
The IXmlElementContext that contains context information related to the target element.
IXmlElementContext? TargetElement { get; }
Property Value
Remarks
This property is only populated if the context is related to an element or attribute.
Type
An XmlContextType that specifies the type of context.