StringType.Val Property

String Value.Represents the attribte in schema: w:val

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


<SchemaAttrAttribute(, "val")> _
Public Property Val As StringValue
Dim instance As StringType
Dim value As StringValue

value = instance.Val

instance.Val = value
[SchemaAttrAttribute(, "val")]
public StringValue Val { get; set; }

Property Value

Type: DocumentFormat.OpenXml.StringValue
Returns StringValue.


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.

See Also


StringType Class

StringType Members

DocumentFormat.OpenXml.Wordprocessing Namespace