Given the tags, I'm assuming that you're using
LINQ to XML[
^] and the
System.Xml.Linq
namespace.
You just need an
XNamespace
for the URI of the
p3
namespace, which you then use to create an
XName
for the attribute name.
For example:
var element = XElement.Parse(@"<image p3:type=""simple"" p3:href=""tcm:86-10894"" p3:title=""tpw-event-large-7"" xmlns:p3=""http://www.w3.org/1999/xlink""></image>");
XNamespace p3 = "http://www.w3.org/1999/xlink";
XName attributeName = p3 + "type";
string type = (string)element.Attribute(attributeName);
Console.WriteLine(type);