EntityHandling 枚举

定义

指定 XmlTextReaderXmlValidatingReader 如何处理实体。Specifies how the XmlTextReader or XmlValidatingReader handle entities.

public enum class EntityHandling
public enum EntityHandling
type EntityHandling = 
Public Enum EntityHandling
继承
EntityHandling

字段

ExpandCharEntities 2

展开字符实体,并将常规实体作为 EntityReference 节点返回。Expands character entities and returns general entities as EntityReference nodes.

必须调用 ResolveEntity 以查看常规实体扩展到的内容。You must call ResolveEntity to see what the general entities expand to. 这样仅在第一次使用实体时扩展实体,就能优化实体的处理。This enables you to optimize entity handling by only expanding the entity the first time it is used.

设置为 ExpandCharEntities 时,对 GetAttribute 方法的读取器调用扩展所有实体(常规实体和字符实体)。When set to ExpandCharEntities, a reader call to the GetAttribute method expands all entities (both general and character entities).

ExpandEntities 1

展开所有实体并返回展开的节点。Expands all entities and returns the expanded nodes.

不返回 EntityReference 节点。EntityReference nodes are not returned. 扩展实体文本而不是实体引用。The entity text is expanded in place of the entity references.

适用于

另请参阅