Class DocType

文件類型

XML DocumentType 節點的表示法。

方法

方法傳回類型簡短說明
detach()Content|null將節點從父項 Element 節點中分離。
getElementName()String取得 DocType 宣告中指定的根 Element 節點名稱。
getInternalSubset()String取得 DocumentType 節點的內部子集資料。
getParentElement()Element|null取得節點的父項 Element 節點。
getPublicId()String取得 DocumentType 節點的外部子集資料公開 ID。
getSystemId()String取得 DocumentType 節點的外部子集資料系統 ID。
getValue()String取得節點直接或間接子項的所有節點文字值,順序與文件中的顯示順序相同。
setElementName(name)DocType將根 Element 節點的名稱設為在 DocType 宣告中指定的名稱。
setInternalSubset(data)DocType設定 DocumentType 節點的內部子集資料。
setPublicId(id)DocTypeDocumentType 節點設定外部子集資料的公開 ID。
setSystemId(id)DocTypeDocumentType 節點設定外部子集資料的系統 ID。

內容詳盡的說明文件

detach()

將節點從父項 Element 節點中分離。如果節點沒有父項,這個方法就不會生效。

回攻員

Content|null:已分離的節點。


getElementName()

取得 DocType 宣告中指定的根 Element 節點名稱。

回攻員

String:在 DocType 宣告中指定的根 Element 節點名稱。


getInternalSubset()

取得 DocumentType 節點的內部子集資料。

回攻員

String - 內部子集資料。


getParentElement()

取得節點的父項 Element 節點。如果節點沒有父項,這個方法會傳回 null

回攻員

Element|null:父項 Element 節點。


getPublicId()

取得 DocumentType 節點的外部子集資料公開 ID。

回攻員

String:外部子集資料的公開 ID。


getSystemId()

取得 DocumentType 節點的外部子集資料系統 ID。

回攻員

String:外部子集資料的系統 ID。


getValue()

取得節點直接或間接子項的所有節點文字值,順序與文件中的顯示順序相同。

回攻員

String:節點直接或間接子項的所有節點文字值。


setElementName(name)

將根 Element 節點的名稱設為在 DocType 宣告中指定的名稱。

參數

名稱類型說明
nameString要在 DocType 宣告中指定的根 Element 節點名稱。

回攻員

DocTypeDocumentType 節點,用於鏈結。


setInternalSubset(data)

設定 DocumentType 節點的內部子集資料。

參數

名稱類型說明
dataString要設定的內部子集資料。

回攻員

DocTypeDocumentType 節點,用於鏈結。


setPublicId(id)

DocumentType 節點設定外部子集資料的公開 ID。

參數

名稱類型說明
idString要設定的外部子集資料公開 ID。

回攻員

DocTypeDocumentType 節點,用於鏈結。


setSystemId(id)

DocumentType 節點設定外部子集資料的系統 ID。

參數

名稱類型說明
idString要設定的外部子集資料系統 ID。

回攻員

DocTypeDocumentType 節點,用於鏈結。