Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 1.1
.NET Framework
Reference
System.Xml
XmlReader Class
Methods
 ResolveEntity Method
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
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

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker