Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlAttribute.cs')
-rw-r--r--mcs/class/System.XML/System.Xml/XmlAttribute.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlAttribute.cs b/mcs/class/System.XML/System.Xml/XmlAttribute.cs
index d02dee88e5c..f5bfcc958a0 100644
--- a/mcs/class/System.XML/System.Xml/XmlAttribute.cs
+++ b/mcs/class/System.XML/System.Xml/XmlAttribute.cs
@@ -104,7 +104,9 @@ namespace System.Xml
#region Properties
public override string BaseURI {
- get { return OwnerElement != null ? OwnerElement.BaseURI : String.Empty; }
+ get {
+ return OwnerElement.BaseURI;
+ }
}
public override string InnerText {
@@ -173,7 +175,9 @@ namespace System.Xml
}
public virtual XmlElement OwnerElement {
- get { return ownerElement; }
+ get {
+ return ownerElement;
+ }
}
public override XmlNode ParentNode {
@@ -244,11 +248,11 @@ namespace System.Xml
}
internal override string XmlLang {
- get { return OwnerElement != null ? OwnerElement.XmlLang : String.Empty; }
+ get { return OwnerElement.XmlLang; }
}
internal override XmlSpace XmlSpace {
- get { return OwnerElement != null ? OwnerElement.XmlSpace : XmlSpace.None; }
+ get { return OwnerElement.XmlSpace; }
}
#endregion
@@ -294,9 +298,6 @@ namespace System.Xml
internal DTDAttributeDefinition GetAttributeDefinition ()
{
- if (OwnerElement == null)
- return null;
-
// If it is default, then directly create new attribute.
DTDAttListDeclaration attList = OwnerDocument.DocumentType != null ? OwnerDocument.DocumentType.DTD.AttListDecls [OwnerElement.Name] : null;
return attList != null ? attList [Name] : null;