protected void WriteAttribute(string localName, string ns, byte[] value)
{
if (value == null) return;
if (localName == "xmlns" || localName.StartsWith("xmlns:", StringComparison.Ordinal))
{
;
}
else
{
int colon = localName.IndexOf(':');
if (colon < 0)
{
if (ns == XmlReservedNs.NsXml)
{
string prefix = _w.LookupPrefix(ns);
if (prefix == null || prefix.Length == 0)
prefix = "xml";
_w.WriteStartAttribute("xml", localName, ns);
}
else
{
_w.WriteStartAttribute(null, localName, ns);
}
}
else
{
string prefix = _w.LookupPrefix(ns);
_w.WriteStartAttribute(prefix, localName.Substring(colon + 1), ns);
}
XmlCustomFormatter.WriteArrayBase64(_w, value, 0, value.Length);
_w.WriteEndAttribute();
}
}