---
name: "rdfGetNsAttribute"
section: "3"
platform: "linux"
package: "libgnurdf-dev"
version: "0.3.0-3"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/rdfGetNsAttribute"
---

# rdfGetNsAttribute(3)

Returns the value of an attribute in the specified namespace.

## NAME

rdfGetNsAttribute - Returns the value of an attribute in the specified namespace.

## SYNOPSIS

**#include \<gnurdf.h\>**

**char \*rdfGetNsAttribute(RdfElement \*element, const char \*attname,** **RdfNamespace \*ns);**

## PARAMETERS

- **element**

  The element containing the attribute.

- **attname**

  The name of the attribute.

- **ns**

  The namespace of the attribute.

## DESCRIPTION

Returns an attribute's value.

Note: The returned attribute must be freed.

## RETURNS

The value of the attribute. This must be freed when no longer in use.

If the attribute does not exist, this will return NULL.

## SEE ALSO

[rdfGetAttribute(3)](/rdfGetAttribute/3.md), [rdfSetAttribute(3)](/rdfSetAttribute/3.md), [rdfSetNsAttribute(3)](/rdfSetNsAttribute/3.md)
