XPath get attribute value

I don’t really understand how to specify the namespace. Through local name?
I just want the attribute to be retrieved in one variable, then to create a protective string type and check for the existence of the tag, if there is no tag, then write an empty value. As you already helped in this thread: