Поделиться через


DocPartId Class

Entry ID.When the object is serialized out as xml, its qualified name is w:guid.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.DocPartId

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class DocPartId _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As DocPartId
public class DocPartId : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

17.12.11 guid (Entry ID)

This element specifies a unique identifier (specified using a 128-bit GUID stored on the val attribute) that uniquely identifies this document building block.[Note: This unique identifier can be used by an application to uniquely reference a single building block regardless of different naming, for example when the same part has different names for localization purposes. end note]

[Example: Consider the following WordprocessingML fragment for the properties of a single glossary document entry:

<w:docPartPr>
…
<w:guid w:val="{00000000-5BD2-4BC8-9F70-7020E1357FB2}" />
…
</w:docPartPr>

The guid element specifies that the unique identifier associated with the parent entry must be {00000000-5BD2-4BC8-9F70-7020E1357FB2}. This value can be used as needed by an application, for example, to uniquely identify a part regardless of its name. end example]

Parent Elements

docPartPr (§17.12.7)

Attributes

Description

val (GUID Value)

Specifies a 128-bit globally unique identifier (GUID) value as defined by the simple type referenced below. The contents of this GUID shall be interpreted based on the context of the parent XML element.

If this attribute is omitted, its value shall be assumed to be null (i.e. no GUID shall be associated with the parent XML element).

[Example: Consider the following WordprocessingML element:

<… w:val="{6A9B8B6F-5BD2-4BC8-9F70-7020E1357FB2}"/>

The val attribute value of {6A9B8B6F-5BD2-4BC8-9F70-7020E1357FB2} must be associated with the context of the parent XML element. end example]

The possible values for this attribute are defined by the ST_Guid simple type (§22.9.2.4).

[Note: The W3C XML Schema definition of this element’s content model (CT_Guid) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

DocPartId Members

DocumentFormat.OpenXml.Wordprocessing Namespace