StringType.Val StringType.Val StringType.Val Property

Definition

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

Remarks

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:pPr>  
  <w:pStyle w:val="heading1" />   
</w:pPr>  

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

However, consider the following fragment:

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

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