StringType.Val StringType.Val StringType.Val Property


String Value.Represents the following attribute in the schema: w:val

[DocumentFormat.OpenXml.SchemaAttr(23, "val")]
public DocumentFormat.OpenXml.StringValue Val { get; set; }
member this.Val : DocumentFormat.OpenXml.StringValue with get, set
Public Property Val As StringValue

Property Value


The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies that its contents will contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

Consider the following WordprocessingML fragment:

  <w:pStyle w:val="heading1" />   

The value of the val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

  <w:alias w:val="SDT Title Example" />  

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element.

The possible values for this attribute are defined by the ST_String simple type.

Applies to