private void ReadAttribute (byte ident)
{
if (attributes.Count == attr_count)
attributes.Add (new AttrNodeInfo (this));
AttrNodeInfo a = attributes [attr_count++];
a.Reset ();
a.Position = source.Position;
switch (ident) {
case BF.AttrString:
a.LocalName = ReadUTF8 ();
break;
case BF.AttrStringPrefix:
a.Prefix = ReadUTF8 ();
a.NSSlot = ns_slot++;
goto case BF.AttrString;
case BF.AttrIndex:
a.DictLocalName = ReadDictName ();
break;
case BF.AttrIndexPrefix:
a.Prefix = ReadUTF8 ();
a.NSSlot = ns_slot++;
goto case BF.AttrIndex;
default:
if (BF.PrefixNAttrStringStart <= ident && ident <= BF.PrefixNAttrStringEnd) {
a.Prefix = ((char) ('a' + ident - BF.PrefixNAttrStringStart)).ToString ();
a.LocalName = ReadUTF8 ();
break;
}
else if (BF.PrefixNAttrIndexStart <= ident && ident <= BF.PrefixNAttrIndexEnd) {
a.Prefix = ((char) ('a' + ident - BF.PrefixNAttrIndexStart)).ToString ();
a.DictLocalName = ReadDictName ();
break;
}
else throw new XmlException (String.Format ("Unexpected attribute node type: 0x{0:X02}", ident));
}
ReadAttributeValueBinary (a);
}