Share via


GetFileExtension Element

The GetFileExtension element returns the file extension for the specified file.

Syntax

<GetFileExtension
  HTMLEncode = "TRUE" | "FALSE">
</GetFileExtension>

Attributes

Name Description
HTMLEncode Optional Boolean. Converts embedded characters so that they are displayed as text in the browser. In other words, characters that could be confused with HTML tags are converted to entities.
Parent Elements Child Elements
Default, Expr, MapToIcon LookupColumn

Example

The following line, <GetFileExtension>somefile.xls</GetFileExtension>, would return: xls.

This example returns file extensions from the Lookup column except in cases where extension equals htm.

<Switch>
  <Expr>
    <GetFileExtension>
      <LookupColumn StripWS="TRUE" />
    </GetFileExtension>
  </Expr>
  <Case Value="htm" />
  <Default>
    <GetFileExtension HTMLEncode="TRUE">
      <LookupColumn StripWS="TRUE" />
    </GetFileExtension>
  </Default>
</Switch>

See Also

Universal Attributes for Page Rendering Elements