---
title: "set_attribute_node_ns method"
url: "https://reference.aspose.com/svg/python-net/aspose.svg/svgviewelement/set_attribute_node_ns/"
product: "Aspose.SVG for Python via .NET API References"
---


## set_attribute_node_ns {#aspose.svg.dom.Attr}

Adds a new attribute. If an attribute with that local name and that namespace URI is already present in the element, it is replaced by the new one.


### Returns 


Returns attribute


```python
def set_attribute_node_ns(self, new_attr):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| new_attr | aspose.svg.dom.Attr | The new attr. |



### See Also
* module [`aspose.svg`](../../)
* class [`Attr`](/svg/python-net/aspose.svg.dom/attr)
* class [`SVGViewElement`](/svg/python-net/aspose.svg/svgviewelement)
