Show / Hide Table of Contents

Class AngleSharpNode

Implementation of INode which is based upon an AngleSharp AngleSharp.Dom.INode.

Inheritance
System.Object
NodeBase
AngleSharpNode
Implements
INode
IHasDocumentSourceInfo
IHasNodes
Inherited Members
NodeBase.Doc
NodeBase.Source
NodeBase.IsImportedNode
NodeBase.Document
NodeBase.SourceInfo
NodeBase.PreReplacementSourceInfo
NodeBase.IsImported
NodeBase.ParentNode
NodeBase.IHasDocumentSourceInfo.SourceInfo
NodeBase.IHasNodes.GetChildNodes()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: ZptSharp.Dom
Assembly: ZptSharp.AngleSharp.dll
Syntax
public class AngleSharpNode : NodeBase, INode, IHasDocumentSourceInfo, IHasNodes

Constructors

| Improve this Doc View Source

AngleSharpNode(INode, AngleSharpDocument, INode, NodeSourceInfo)

Initializes a new instance of the AngleSharpDocument class.

Declaration
public AngleSharpNode(INode node, AngleSharpDocument document, INode parent = null, NodeSourceInfo sourceInfo = null)
Parameters
Type Name Description
AngleSharp.Dom.INode node

The native node object.

AngleSharpDocument document

The containing document.

INode parent

The parent node.

NodeSourceInfo sourceInfo

Source info.

Properties

| Improve this Doc View Source

Attributes

Gets a collection of the node's attributes.

Declaration
public override IList<IAttribute> Attributes { get; }
Property Value
Type Description
System.Collections.Generic.IList<IAttribute>

The attributes.

Overrides
NodeBase.Attributes
| Improve this Doc View Source

ChildNodes

Gets the nodes contained within the current node.

Declaration
public override IList<INode> ChildNodes { get; }
Property Value
Type Description
System.Collections.Generic.IList<INode>

The child nodes.

Overrides
NodeBase.ChildNodes
| Improve this Doc View Source

ElementNode

Gets a representation of NativeNode as an AngleSharp.Dom.IElement, if it is in fact an element node.

Declaration
protected IElement ElementNode { get; }
Property Value
Type Description
AngleSharp.Dom.IElement

The element node.

| Improve this Doc View Source

IsElement

Gets a value indicating whether this INode is an element node.

Declaration
public override bool IsElement { get; }
Property Value
Type Description
System.Boolean

true if the current instance is an element; otherwise, false.

Overrides
NodeBase.IsElement
| Improve this Doc View Source

NativeNode

Gets the native AngleSharp AngleSharp.Dom.INode instance which acts as the basis for the current node.

Declaration
public INode NativeNode { get; }
Property Value
Type Description
AngleSharp.Dom.INode

The native AngleSharp node object.

Methods

| Improve this Doc View Source

CreateAttribute(AttributeSpec)

Creates and returns a new attribute from the specified specification.

Declaration
public override IAttribute CreateAttribute(AttributeSpec spec)
Parameters
Type Name Description
AttributeSpec spec

The attribute specification which will be used to name the attribute.

Returns
Type Description
IAttribute

An attribute.

Overrides
NodeBase.CreateAttribute(AttributeSpec)
| Improve this Doc View Source

CreateComment(String)

Creates and returns a new comment node.

Declaration
public override INode CreateComment(string commentText)
Parameters
Type Name Description
System.String commentText

The text for the comment.

Returns
Type Description
INode

The comment node.

Overrides
NodeBase.CreateComment(String)
| Improve this Doc View Source

CreateTextNode(String)

Creates and returns a new text node from the specified content. Even if the content contains valid markup, it is strictly to be treated as text.

Declaration
public override INode CreateTextNode(string content)
Parameters
Type Name Description
System.String content

The text content for the node.

Returns
Type Description
INode

A text node.

Overrides
NodeBase.CreateTextNode(String)
| Improve this Doc View Source

GetCopy()

Gets a copy of the current node and all of its children.

Declaration
public override INode GetCopy()
Returns
Type Description
INode

The copied node.

Overrides
NodeBase.GetCopy()
| Improve this Doc View Source

IsInNamespace(Namespace)

Gets a value which indicates whether or not the current node is in the specified namespace.

Declaration
public override bool IsInNamespace(Namespace namespace)
Parameters
Type Name Description
Namespace namespace

A namespace.

Returns
Type Description
System.Boolean

true, if the node is in the specified namespace, false otherwise.

Overrides
NodeBase.IsInNamespace(Namespace)
| Improve this Doc View Source

ParseAsNodes(String)

Parses the specified text markup and returns the resulting nodes.

Declaration
public override IList<INode> ParseAsNodes(string markup)
Parameters
Type Name Description
System.String markup

Markup text.

Returns
Type Description
System.Collections.Generic.IList<INode>

The parsed nodes.

Overrides
NodeBase.ParseAsNodes(String)
| Improve this Doc View Source

ToString()

Returns a System.String that represents the current AngleSharpNode. If it is an element node then this method shows the element's start-tag. Otherwise it returns the same as the native AngleSharp.Dom.INode's System.Object.ToString() method.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the current AngleSharpNode.

Overrides
System.Object.ToString()

Implements

INode
IHasDocumentSourceInfo
IHasNodes

Extension Methods

NodeExtensions.GetMatchingAttribute(INode, AttributeSpec)
NodeExtensions.GetMatchingAttribute(INode, IEnumerable<AttributeSpec>, out AttributeSpec)
NodeExtensions.AddChildren(INode, IEnumerable<INode>, Nullable<Int32>)
NodeExtensions.AddChildren(INode, IList<INode>, Nullable<Int32>)
NodeExtensions.Remove(INode)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX