XmlReader.ResolveEntity XmlReader.ResolveEntity XmlReader.ResolveEntity XmlReader.ResolveEntity Method

定义

当在派生类中被重写时,解析 EntityReference 节点的实体引用。When overridden in a derived class, resolves the entity reference for EntityReference nodes.

public:
 abstract void ResolveEntity();
public abstract void ResolveEntity ();
abstract member ResolveEntity : unit -> unit
Public MustOverride Sub ResolveEntity ()

异常

读取器未定位在 EntityReference 节点上;该读取器的实现不能解析实体(CanResolveEntity 返回 false)。The reader is not positioned on an EntityReference node; this implementation of the reader cannot resolve entities (CanResolveEntity returns false).

- 或 --or-

在上一次异步操作完成之前调用了 XmlReader 方法。An XmlReader method was called before a previous asynchronous operation finished. 在此情况下,会引发 InvalidOperationException 并显示消息“异步操作已在进行中。”In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."

注解

如果读取器定位在EntityReference节点 (XmlNodeType.EntityReference),如果Read之后的调用此方法中,实体替换文本进行分析。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. 完成实体替换文本后,EndEntity返回节点关闭实体引用作用域。When the entity replacement text is finished, an EndEntity node is returned to close the entity reference scope.

备注

调用此方法后,如果实体是一部分的属性值,则必须调用ReadAttributeValue来单步执行该实体。After calling this method, if the entity is part of an attribute value, you must call ReadAttributeValue to step into the entity.

适用于

另请参阅