Interface IParentNode
Interface IParentNode
命名空间: Aspose.Html.Dom
程序集: Aspose.HTML.dll (25.1.0)
定义了 Aspose.Html.Dom.IParentNode 接口,该接口由任何可能的父级实现。
[ComVisible(true)]
[DOMNoInterfaceObject]
public interface IParentNode : IElementTraversal
实现
属性
ChildElementCount
childElementCount 属性必须返回上下文对象的子元素数量。
int ChildElementCount { get; }
属性值
Children
返回子元素。
[DOMName("children")]
HTMLCollection Children { get; }
属性值
FirstElementChild
返回第一个子元素,如果没有则返回 null。
Element FirstElementChild { get; }
属性值
LastElementChild
返回最后一个子元素,如果没有则返回 null。
Element LastElementChild { get; }
属性值
方法
QuerySelector(string)
返回匹配选择器的节点的第一个后代元素。
[DOMName("querySelector")]
[DOMNullable]
Element QuerySelector(string selectors)
参数
selectors
string
选择器。
返回
返回第一个匹配的元素。
QuerySelectorAll(string)
返回匹配选择器的节点的所有元素后代。
[DOMName("querySelectorAll")]
NodeList QuerySelectorAll(string selectors)
参数
selectors
string
选择器。
返回
返回在上下文对象上运行范围匹配选择器字符串的静态结果。