HTMLDECODE Function


HTMLDECODE Function

Decodes a string containing HTML numeric character references or HTML character entity references and returns the decoded string

Category: Web Tools

Syntax

HTMLDECODE ( expression )

Arguments

expression

  • specifies any character expression.

Details

The HTMLDECODE function recognizes the following character entity references:

Character entity reference

decoded character

&

&

<

<

&gt;

>

&quot;

"

&apos; [*]

'

[*] (SAS 9 only)

Unrecognized entities (&< name >;) are left unmodified in the output string.

The HTMLDECODE function recognizes numeric entity references that are of the form

& #nnn;

where nnn specifies a decimal number that contains one or more digits.

& #Xnnn;

where nnn specifies a hexadecimal number that contains one or more digits.

Operating Environment Information: Numeric character references that cannot be represented in the current SAS session encoding will not be decoded. The reference will be copied unchanged to the output string.

Examples

SAS Statements

Results

x1=htmldecode('not a & lt;tag & gt;');

not a < tag >

x2=htmldecode(' & amp;);

' & '

x3=htmldecode ('ABC');

'ABC'

See Also

Function:

  • 'HTMLENCODE Function' on page 581




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net