26 |
using System.Collections; |
using System.Collections; |
27 |
using System.Text; |
using System.Text; |
28 |
using System.Xml.Private; |
using System.Xml.Private; |
29 |
|
|
30 |
|
#if CONFIG_XPATH |
31 |
using System.Xml.XPath; |
using System.Xml.XPath; |
32 |
|
#endif |
33 |
|
|
34 |
#if ECMA_COMPAT |
#if ECMA_COMPAT |
35 |
internal |
internal |
36 |
#else |
#else |
37 |
public |
public |
38 |
#endif |
#endif |
39 |
abstract class XmlNode : ICloneable, IEnumerable, IXPathNavigable |
abstract class XmlNode : ICloneable, IEnumerable |
40 |
|
#if CONFIG_XPATH |
41 |
|
, IXPathNavigable |
42 |
|
#endif |
43 |
{ |
{ |
44 |
// Internal state. |
// Internal state. |
45 |
internal XmlNode parent; |
internal XmlNode parent; |
508 |
// Clone this node in either shallow or deep mode. |
// Clone this node in either shallow or deep mode. |
509 |
public abstract XmlNode CloneNode(bool deep); |
public abstract XmlNode CloneNode(bool deep); |
510 |
|
|
511 |
|
#if CONFIG_XPATH |
512 |
// Implement the IXPathNavigator interface. |
// Implement the IXPathNavigator interface. |
|
[TODO] |
|
513 |
public virtual XPathNavigator CreateNavigator() |
public virtual XPathNavigator CreateNavigator() |
514 |
{ |
{ |
|
// TODO |
|
515 |
return new XmlDocumentNavigator(this); |
return new XmlDocumentNavigator(this); |
516 |
} |
} |
517 |
|
#endif /* CONFIG_XPATH */ |
518 |
|
|
519 |
// Implement the IEnumerable interface, |
// Implement the IEnumerable interface, |
520 |
public IEnumerator GetEnumerator() |
public IEnumerator GetEnumerator() |
1012 |
return oldChild; |
return oldChild; |
1013 |
} |
} |
1014 |
|
|
1015 |
|
#if CONFIG_XPATH |
1016 |
|
|
1017 |
// Select a list of nodes matching a particular XPath expression. |
// Select a list of nodes matching a particular XPath expression. |
1018 |
public XmlNodeList SelectNodes(String xpath) |
public XmlNodeList SelectNodes(String xpath) |
1019 |
{ |
{ |
1051 |
return list[0]; |
return list[0]; |
1052 |
} |
} |
1053 |
|
|
1054 |
|
#endif /* CONFIG_XPATH */ |
1055 |
|
|
1056 |
// Test if this implementation supports a particular DOM feature. |
// Test if this implementation supports a particular DOM feature. |
1057 |
public virtual bool Supports(String feature, String version) |
public virtual bool Supports(String feature, String version) |
1058 |
{ |
{ |