| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- //
- // System.Xml.XmlElement
- //
- // Author:
- // Daniel Weber ([email protected])
- //
- // (C) 2001 Daniel Weber
- using System;
- namespace System.Xml
- {
- public class XmlElement : XmlLinkedNode
- {
- #region Fields
- private XmlAttributeCollection attributes;
- private string localName;
- private string namespaceURI;
- private string prefix;
- #endregion
- #region Constructor
- protected internal XmlElement(string prefix, string localName, string namespaceURI, XmlDocument doc) : base(doc)
- {
- this.prefix = prefix;
- this.localName = localName;
- this.namespaceURI = namespaceURI;
- attributes = new XmlAttributeCollection(this);
- }
- #endregion
- #region Properties
- public override XmlAttributeCollection Attributes
- {
- get { return attributes; }
- }
- public virtual bool HasAttributes
- {
- get { return attributes.Count > 0; }
- }
- [MonoTODO]
- public override string InnerText
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
- [MonoTODO]
- public override string InnerXml
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
- [MonoTODO]
- public bool IsEmpty
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
- public override string LocalName
- {
- get { return localName; }
- }
- public override string Name
- {
- get { return prefix != String.Empty ? prefix + ":" + localName : localName; }
- }
- public override string NamespaceURI
- {
- get { return namespaceURI; }
- }
- [MonoTODO()]
- public override XmlNode NextSibling
- {
- get { return base.NextSibling; }
- }
- public override XmlNodeType NodeType
- {
- get { return XmlNodeType.Element; }
- }
- public override string Prefix
- {
- get { return prefix; }
- }
- [MonoTODO]
- public override XmlDocument OwnerDocument
- {
- get { return base.OwnerDocument; }
- }
- public override string Value
- {
- get { return null; }
- set
- {
- // Do nothing.
- }
- }
- #endregion
- #region Methods
- [MonoTODO]
- public override XmlNode CloneNode (bool deep)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual string GetAttribute (string name)
- {
- XmlNode attributeNode = Attributes.GetNamedItem (name);
- return attributeNode != null ? attributeNode.Value : String.Empty;
- }
- [MonoTODO]
- public virtual string GetAttribute(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlAttribute GetAttributeNode(string name)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlAttribute GetAttributeNode(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlNodeList GetElementsByTagName(string name)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlNodeList GetElementsByTagName(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual bool HasAttribute(string name)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual bool HasAttribute(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO("Don't remove default attributes.")]
- public override void RemoveAll()
- {
- // Remove the child nodes.
- base.RemoveAll();
- // Remove all attributes.
- attributes.RemoveAll();
- }
- [MonoTODO]
- public virtual void RemoveAllAttributes()
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual void RemoveAttribute(string name)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual void RemoveAttribute(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlNode RemoveAttributeAt(int i)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlAttribute RemoveAttributeNode(XmlAttribute oldAttr)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlAttribute RemoveAttributeNode(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual void SetAttribute(string name, string value)
- {
- XmlAttribute attribute = OwnerDocument.CreateAttribute (name);
- attribute.Value = value;
- Attributes.SetNamedItem (attribute);
- }
- [MonoTODO]
- public virtual void SetAttribute(string localName, string namespaceURI, string value)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlAttribute SetAttributeNode(XmlAttribute newAttr)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public virtual XmlAttribute SetAttributeNode(string localName, string namespaceURI)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public override void WriteContentTo(XmlWriter w)
- {
- throw new NotImplementedException();
- }
- [MonoTODO]
- public override void WriteTo(XmlWriter w)
- {
- throw new NotImplementedException();
- }
- #endregion
- }
- }
|