Export (0) Print
Expand All

GetFileExtension Element (View)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Returns the file extension for the specified file.


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

Attribute

Description

HTMLEncode

Optional Boolean. TRUE to convert 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.

Minimum: 0

Maximum: Unbounded

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

The following 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>
Show:
© 2015 Microsoft