Table of Contents

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

PolarXMLnode

HasChildNodes

Returns a boolean indicating this node has child nodes.

public bool HasChildNodes { get; }

Property Value

bool

InnerText

Returns the text contained by this node.

public string InnerText { get; set; }

Property Value

string

LastChild

Gets the last child of this node.

public PolarXMLnode LastChild { get; }

Property Value

PolarXMLnode

LocalName

Returns the local name of this node.

public string LocalName { get; }

Property Value

string

Name

Returns the Name of this node

public string Name { get; }

Property Value

string

NextSibling

Gets the node immediately following this node.

public PolarXMLnode NextSibling { get; }

Property Value

PolarXMLnode

NodeType

Returns the type of this node.

public XmlNodeType NodeType { get; }

Property Value

XmlNodeType

OwnerDocument

Returns the xml document containing this node.

public PolarXMLdocument OwnerDocument { get; }

Property Value

PolarXMLdocument

ParentNode

Gets the parent of this node.

public PolarXMLnode ParentNode { get; }

Property Value

PolarXMLnode

PreviousSibling

Gets the node immediately preceeding this node.

public PolarXMLnode PreviousSibling { get; }

Property Value

PolarXMLnode

XML

Returns the xml for this node.

public string XML { get; }

Property Value

string

XmlNode

Returns the underlying XmlNode this class 'wraps'

public XmlNode XmlNode { get; }

Property Value

XmlNode

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

object

Methods

AppendChild(PolarXMLnode)

This method is used to append a child node.

public PolarXMLnode AppendChild(PolarXMLnode pChildNode)

Parameters

pChildNode PolarXMLnode

The child node to append.

Returns

PolarXMLnode

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 string

The name of the attribute to get.

pDefaultValue string

An 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 PolarXMLnode

The node to insert.

pReferenceNode PolarXMLnode

The 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 PolarXMLnode

The node to insert.

pReferenceNode PolarXMLnode

The 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 PolarXMLnode

The 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 string

The 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 string

The 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)

Parameters

pAttributeName string

The name of the attribute to set.

pAttributeValue string

The value to set the attribute to.