ResolveEntity Method

XmlReader.ResolveEntity Method

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

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

Exceptions

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

Remarks

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.

Example

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

Requirements

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

Show:
© 2016 Microsoft