This documentation is archived and is not being maintained.

XmlReader.ResolveEntity Method

When overridden in a derived class, resolves the entity reference for EntityReference nodes.

[Visual Basic]
Public MustOverride Sub ResolveEntity()
public abstract void ResolveEntity();
public: virtual void ResolveEntity() = 0;
public abstract function ResolveEntity();


Exception Type Condition
InvalidOperationException The reader is not positioned on an EntityReference node; this implementation of the reader cannot resolve entities (CanResolveEntity returns false).


If the reader is positioned on an EntityReference node (XmlNodeType.EntityReference), if Read is called after calling this method, the entity replacement text is parsed. When the entity replacement text is finished, an EndEntity node is returned to close the entity reference scope.

Note   After calling this method, if the entity is part of an attribute value, you must call ReadAttributeValue to step into the entity.


See ResolveEntity (in the XmlValidatingReader class) for a sample using this method.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace | EntityHandling | CanResolveEntity