# UxmlAttributeDescription

> Base class for describing an XML attribute.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public abstract class UxmlAttributeDescription
```

## Constructors

| Constructor                                                                                                           | Description  |
| --------------------------------------------------------------------------------------------------------------------- | ------------ |
| [UxmlAttributeDescription()](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/ctor.md) | Constructor. |

## Properties

| Property                                                                                                                        | Description                                                |
| ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [defaultValueAsString](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/defaultvalueasstring.md) | The default value for the attribute, as a string.          |
| [name](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/name.md)                                 | The attribute name.                                        |
| [obsoleteNames](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/obsoletenames.md)               | A list of obsolete names for this attribute.               |
| [restriction](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/restriction.md)                   | Restrictions on the possible values of the attribute.      |
| [type](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/type.md)                                 | Attribute type.                                            |
| [typeNamespace](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/typenamespace.md)               | Attribute namespace.                                       |
| [use](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/use-1.md)                                 | Whether the attribute is optional, required or prohibited. |

## Methods

| Method                                                                                                                      | Description                                              |
| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [GetValueFromBag](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/getvaluefrombag.md)       | Get the attribute value from the attribute bag.          |
| [TryGetValueFromBag](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/trygetvaluefrombag.md) | Tries to get the attribute value from the attribute bag. |

## Enums

| Enum                                                                                                                   | Description                        |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| [UxmlAttributeDescription.Use](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/use.md) | An enum to describe attribute use. |
