## AddOrReplace(DataElement) {#addorreplace}

Adds new DataElement or replaces it if ElementID already exists.

```csharp
public DataElement AddOrReplace(DataElement node)
```

| Parameter | Type | Description |
| --- | --- | --- |
| node | DataElement | DataElement to add |

### Return Value

Added/replaced data element

### See Also

* class [DataElement](../../usadriveidjurisdsubfile.dataelement/)
* class [USADriveIdJurisdSubfile](../)
* namespace [Aspose.BarCode.ComplexBarcode](../../../aspose.barcode.complexbarcode/)
* assembly [Aspose.BarCode](../../../)

---

## AddOrReplace(string, string) {#addorreplace_1}

Adds a new DataElement with the specified identifier and value, or replaces the existing element if an entry with the same ElementID is already present.

```csharp
public DataElement AddOrReplace(string id, string value)
```

| Parameter | Type | Description |
| --- | --- | --- |
| id | String | A 3-letter identifier that uniquely specifies the jurisdiction-related data element. |
| value | String | The text value assigned to the data element; this value will overwrite the existing one if the element already exists. |

### Return Value

The DataElement instance that was added to the collection or updated in place.

### See Also

* class [DataElement](../../usadriveidjurisdsubfile.dataelement/)
* class [USADriveIdJurisdSubfile](../)
* namespace [Aspose.BarCode.ComplexBarcode](../../../aspose.barcode.complexbarcode/)
* assembly [Aspose.BarCode](../../../)


