diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2006-01-30 22:30:59 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2006-01-30 22:30:59 +0300 |
commit | 4bacaff049344506a3df320375a7a481cc7d2235 (patch) | |
tree | 961024285c3996181dc0884f1f92a121a154c2e8 /mcs/class/System.XML/System.Xml/XmlElement.cs | |
parent | 93d5f78c34ab2aa7f292995e8b02b2ff1ff4e6cd (diff) |
2006-01-30 Atsushi Enomoto <atsushi@ximian.com>
* XmlDocument.cs, XmlAttribute.cs, XmlElement.cs : Avoid unnecessary
name checks in CreateElement() and CreateAttribute().
get_DocumentType() could be stopped when the iterated child node
is the document element.
* XmlNode.cs : removed commented lines.
* XmlNameEntry.cs : hash code for a name entry is mostly identical by
its local name, so avoid extraneous GetHashCode() especially on
namespaces.
svn path=/trunk/mcs/; revision=56270
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlElement.cs')
-rw-r--r-- | mcs/class/System.XML/System.Xml/XmlElement.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlElement.cs b/mcs/class/System.XML/System.Xml/XmlElement.cs index ee04bee58ea..24e31c1d852 100644 --- a/mcs/class/System.XML/System.Xml/XmlElement.cs +++ b/mcs/class/System.XML/System.Xml/XmlElement.cs @@ -73,17 +73,15 @@ namespace System.Xml XmlDocument doc, bool atomizedNames) : base (doc) { - XmlConvert.VerifyName (localName); - if (!atomizedNames) { + XmlConvert.VerifyName (localName); + prefix = doc.NameTable.Add (prefix); localName = doc.NameTable.Add (localName); namespaceURI = doc.NameTable.Add (namespaceURI); } name = doc.NameCache.Add (prefix, localName, namespaceURI, true); -// attributes = new XmlAttributeCollection (this); - if(doc.DocumentType != null) { DTDAttListDeclaration attlist = doc.DocumentType.DTD.AttListDecls [localName]; |