

# XssMatchStatement
<a name="API_XssMatchStatement"></a>

A rule statement that inspects for cross-site scripting (XSS) attacks. In XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers. 

## Contents
<a name="API_XssMatchStatement_Contents"></a>

 ** FieldToMatch **   <a name="WAF-Type-XssMatchStatement-FieldToMatch"></a>
The part of the web request that you want AWS WAF to inspect.   
Type: [FieldToMatch](API_FieldToMatch.md) object  
Required: Yes

 ** TextTransformations **   <a name="WAF-Type-XssMatchStatement-TextTransformations"></a>
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. Text transformations are used in rule match statements, to transform the `FieldToMatch` request component before inspecting it, and they're used in rate-based rule statements, to transform request components before using them as custom aggregation keys. If you specify one or more transformations to apply, AWS WAF performs all transformations on the specified content, starting from the lowest priority setting, and then uses the transformed component contents.   
Type: Array of [TextTransformation](API_TextTransformation.md) objects  
Array Members: Minimum number of 1 item.  
Required: Yes

## See Also
<a name="API_XssMatchStatement_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/wafv2-2019-07-29/XssMatchStatement) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/wafv2-2019-07-29/XssMatchStatement) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/wafv2-2019-07-29/XssMatchStatement) 