Class PolarXMLnode
- Namespace
- PolarStudio
- Assembly
- PolarStudio.dll
This class is a wrapper for an XML node.
public class PolarXMLnode
- Inheritance
-
PolarXMLnode
- Inherited Members
- Extension Methods
Properties
FirstChild
Gets the first child of this node.
public PolarXMLnode FirstChild { get; }
Property Value
HasChildNodes
Returns a boolean indicating this node has child nodes.
public bool HasChildNodes { get; }
Property Value
InnerText
Returns the text contained by this node.
public string InnerText { get; set; }
Property Value
LastChild
Gets the last child of this node.
public PolarXMLnode LastChild { get; }
Property Value
LocalName
Returns the local name of this node.
public string LocalName { get; }
Property Value
Name
Returns the Name of this node
public string Name { get; }
Property Value
NextSibling
Gets the node immediately following this node.
public PolarXMLnode NextSibling { get; }
Property Value
NodeType
Returns the type of this node.
public XmlNodeType NodeType { get; }
Property Value
OwnerDocument
Returns the xml document containing this node.
public PolarXMLdocument OwnerDocument { get; }
Property Value
ParentNode
Gets the parent of this node.
public PolarXMLnode ParentNode { get; }
Property Value
PreviousSibling
Gets the node immediately preceeding this node.
public PolarXMLnode PreviousSibling { get; }
Property Value
XML
Returns the xml for this node.
public string XML { get; }
Property Value
XmlNode
Returns the underlying XmlNode this class 'wraps'
public XmlNode XmlNode { get; }
Property Value
nodeTypedValue
Gets the value of the node typed to a value as specified in the dt:dt attribute of the node.
public object nodeTypedValue { get; set; }
Property Value
Methods
AppendChild(PolarXMLnode)
This method is used to append a child node.
public PolarXMLnode AppendChild(PolarXMLnode pChildNode)
Parameters
pChildNode
PolarXMLnodeThe child node to append.
Returns
CloneNode()
This method creates a new node that is a clone of this node.
public PolarXMLnode CloneNode()
Returns
- PolarXMLnode
A clone of this node.
GetAttribute(string, string)
Gets the specified attribute.
public string GetAttribute(string pAttributeName, string pDefaultValue = "")
Parameters
pAttributeName
stringThe name of the attribute to get.
pDefaultValue
stringAn optional value to use if the attribute is not present.
Returns
- string
The value of the attribute or the specified DefaultValue if the attribute is not present.
InsertAfter(PolarXMLnode, PolarXMLnode)
Inserts the specified node immediately after the specified reference node.
public PolarXMLnode InsertAfter(PolarXMLnode pChildNode, PolarXMLnode pReferenceNode)
Parameters
pChildNode
PolarXMLnodeThe node to insert.
pReferenceNode
PolarXMLnodeThe reference node to insert the child node after.
Returns
- PolarXMLnode
The inserted node.
InsertBefore(PolarXMLnode, PolarXMLnode)
Inserts the specified node immediately before the specified reference node.
public PolarXMLnode InsertBefore(PolarXMLnode pChildNode, PolarXMLnode pReferenceNode)
Parameters
pChildNode
PolarXMLnodeThe node to insert.
pReferenceNode
PolarXMLnodeThe reference node to insert the child node before.
Returns
- PolarXMLnode
The inserted node.
RemoveChild(PolarXMLnode)
Removed the specified child node
public PolarXMLnode RemoveChild(PolarXMLnode pNodeToRemove)
Parameters
pNodeToRemove
PolarXMLnodeThe node to remove
Returns
- PolarXMLnode
The removed node.
SelectNodes(string)
This method runs a XPath expression to select one single node.
public Collection<PolarXMLnode> SelectNodes(string pXPath)
Parameters
pXPath
stringThe XPath expression to run.
Returns
- Collection<PolarXMLnode>
A collection of nodes matching the expression.
SelectSingleNode(string)
This method runs a XPath expression to select one single node.
public PolarXMLnode SelectSingleNode(string pXPath)
Parameters
pXPath
stringThe XPath expression to run.
Returns
- PolarXMLnode
The first matching XML node or Nothing if no nodes match the expression.
SetAttribute(string, string)
Sets the specified attribute to the specified value.
public void SetAttribute(string pAttributeName, string pAttributeValue)