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