Table of Contents

Class OdfIndex

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Represents the abstract base class for indexes in an ODF document. 表示 ODF 文件中索引的抽象基底類別。

public abstract class OdfIndex
Inheritance
OdfIndex
Derived
Inherited Members

Constructors

OdfIndex(OdfNode, TextDocument)

Initializes a new instance of the OdfIndex class. 初始化 OdfIndex 類別的新執行個體。

protected OdfIndex(OdfNode node, TextDocument doc)

Parameters

node OdfNode

The associated OdfNode. / 相關聯的 OdfNode 節點。

doc TextDocument

The owning text document. / 所屬的文字文件。

Fields

Doc

The owning text document. 所屬的文字文件。

protected readonly TextDocument Doc

Field Value

TextDocument

Properties

BodyNode

Gets the index's body node. 取得索引的本文節點。

public OdfNode? BodyNode { get; }

Property Value

OdfNode

Name

Gets or sets the name of the index. 取得或設定索引的名稱。

public string Name { get; set; }

Property Value

string

Node

Gets the OdfNode associated with this index. 取得與此索引相關聯的 OdfNode 節點。

public OdfNode Node { get; }

Property Value

OdfNode

SourceNode

Gets the index's source node. 取得索引的來源節點。

public OdfNode? SourceNode { get; }

Property Value

OdfNode

Methods

FindChild(OdfNode, string, string)

Finds the first child matching the specified XML local name and namespace. 尋找符合指定 XML 本地名稱與命名空間的第一個子專案。

protected OdfNode? FindChild(OdfNode parent, string localName, string ns)

Parameters

parent OdfNode

The parent node. / 父節點。

localName string

The XML local name. / XML 本地名稱。

ns string

The namespace URI. / 命名空間 URI。

Returns

OdfNode

The matching child, or null if none exists. / 符合條件的子專案,若無則傳回 null

FindOrCreateChild(OdfNode, string, string, string)

Finds or creates a child matching the specified XML local name and namespace. 尋找或建立符合指定 XML 本地名稱與命名空間的子專案。

protected OdfNode FindOrCreateChild(OdfNode parent, string localName, string ns, string prefix)

Parameters

parent OdfNode

The parent node. / 父節點。

localName string

The XML local name. / XML 本地名稱。

ns string

The namespace URI. / 命名空間 URI。

prefix string

The namespace prefix. / 命名空間前綴。

Returns

OdfNode

The existing or newly created child node. / 現有的或新建立的子節點。

GetSourceLocalName()

Gets the XML local name of the index source node. 取得索引來源節點的 XML 本地名稱。

protected abstract string GetSourceLocalName()

Returns

string

The XML local name. / XML 本地名稱。

Update()

Updates the index content. 更新索引內容。

public abstract void Update()