using System;
using System.Collections;
+using System.IO;
using System.Xml.XPath;
namespace System.Xml
#region Constructors
- protected internal XmlNode(XmlDocument ownerDocument)
+ internal XmlNode (XmlDocument ownerDocument)
{
this.ownerDocument = ownerDocument;
}
set { throw new NotImplementedException (); }
}
- [MonoTODO]
+ [MonoTODO("Setter.")]
public virtual string InnerXml {
- get { throw new NotImplementedException (); }
+ get {
+ StringWriter sw = new StringWriter ();
+ XmlTextWriter xtw = new XmlTextWriter (sw);
+
+ WriteContentTo(xtw);
+
+ return sw.GetStringBuilder().ToString();
+ }
+
set { throw new NotImplementedException (); }
}
public abstract XmlNodeType NodeType { get; }
- [MonoTODO]
public virtual string OuterXml {
- get { throw new NotImplementedException (); }
+ get {
+ StringWriter sw = new StringWriter ();
+ XmlTextWriter xtw = new XmlTextWriter (sw);
+
+ WriteTo(xtw);
+
+ return sw.GetStringBuilder().ToString();
+ }
}
public virtual XmlDocument OwnerDocument {
get { return null; }
}
- [MonoTODO]
public virtual string Value {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return null; }
+ set { throw new InvalidOperationException ("This node does not have a value"); }
}
#endregion
public virtual XmlNode AppendChild (XmlNode newChild)
{
- if (NodeType == XmlNodeType.Document || NodeType == XmlNodeType.Element || NodeType == XmlNodeType.Attribute) {
- XmlLinkedNode newLinkedChild = (XmlLinkedNode)newChild;
+ if (NodeType == XmlNodeType.Document
+ || NodeType == XmlNodeType.Element
+ || NodeType == XmlNodeType.Attribute) {
+ XmlLinkedNode newLinkedChild = (XmlLinkedNode) newChild;
XmlLinkedNode lastLinkedChild = LastLinkedChild;
+
+ newLinkedChild.parentNode = this;
if (lastLinkedChild != null) {
newLinkedChild.NextLinkedSibling = lastLinkedChild.NextLinkedSibling;
}
[MonoTODO]
- public virtual XmlNodeList SelectNodes (string xpath)
+ public XmlNodeList SelectNodes (string xpath)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public virtual XmlNodeList SelectNodes (string xpath, XmlNamespaceManager nsmgr)
+ public XmlNodeList SelectNodes (string xpath, XmlNamespaceManager nsmgr)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public virtual XmlNode SelectSingleNode (string xpath)
+ public XmlNode SelectSingleNode (string xpath)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public virtual XmlNode SelectSingleNode (string xpath, XmlNamespaceManager nsmgr)
+ public XmlNode SelectSingleNode (string xpath, XmlNamespaceManager nsmgr)
{
throw new NotImplementedException ();
}