Class DocType

DocType

XML DocumentType 節點的表示法。

方法

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

內容詳盡的說明文件

detach()

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

回攻員

Content:已分離的節點


getElementName()

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

回攻員

StringDocType 宣告中指定的根 Element 節點名稱


getInternalSubset()

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

回攻員

String:內部子集資料


getParentElement()

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

回攻員

Element:父項 Element 節點


getPublicId()

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

回攻員

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


getSystemId()

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

回攻員

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


getValue()

取得節點的所有直接或間接子項節點的文字值,並依文件中顯示的順序排列。

回攻員

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


setElementName(name)

設定 DocType 宣告中要指定的根 Element 節點名稱。

參數

名稱類型說明
nameStringDocType 宣告中指定的根 Element 節點名稱

回攻員

DocType:用於鏈結的 DocumentType 節點


setInternalSubset(data)

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

參數

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

回攻員

DocType:用於鏈結的 DocumentType 節點


setPublicId(id)

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

參數

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

回攻員

DocType:用於鏈結的 DocumentType 節點


setSystemId(id)

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

參數

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

回攻員

DocType:用於鏈結的 DocumentType 節點