DOMINO の XML


Document
Node を継承します。Document インターフェースは HTML または XML 文書全体を示します。概念上は文書ツリーのルートで文書データへの第一アクセスを提供します。

要素、Text ノード、コメント、処理命令などは、Document コンテキストの外には存在できないため、Document インターフェースはこれらのオブジェクトを作るのに必要なファクトリーメソッドを含んでいます。生成された Node オブジェクトには、生成されたコンテキスト内の Document とオブジェクト自身を関連付ける ownerDocument 属性があります。

メソッド
createAttribute

createCDATASection

createComment

createDocumentFragment

createElement

createEntityReference

createProcessingInstruction

createTextNode

getDoctype

getDocumentElement

getElementsByTagName

getImplementation

createAttribute
指定された名前の Attr を作成します。setAttribute メソッドを使って、Attr インスタンスを Element に設定できることに注意してください。

構文:

public Attr createAttribute(java.lang.String name)
throws DOMException

パラメータ


戻り値:
例外処理:

createCDATASection
値が指定した文字列である CDATASection ノードを作成します。

構文:

public CDATASection createCDATASection(java.lang.String data)
throws DOMException

パラメータ


戻り値:
例外処理:

createComment
指定した文字列で Comment ノードを作成します。

構文:

public Comment createComment(java.lang.String data)

パラメータ


戻り値:

createDocumentFragment
空の DocumentFragment オブジェクトを作成します。

構文:

public DocumentFragment createDocumentFragment()

戻り値:


createElement
タイプが指定された要素を作成します。返されるインスタンスは Element インターフェースを実装しているため、属性を返されたオブジェクトに直接指定できることに注意してください。

構文:

public Element createElement(java.lang.String tagName)
throws DOMException

パラメータ


戻り値:
例外処理:

createEntityReference
EntityReference オブジェクトを作成します。

構文:

public EntityReference createEntityReference(java.lang.String name)
throws DOMException

パラメータ


戻り値:
例外処理:

createProcessingInstruction
指定した名前とデータ文字列で ProcessingInstruction ノードを作成します。

構文:

public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
throws DOMException

パラメータ


戻り値:
例外処理:

createTextNode
指定した文字列で Text ノードを作成します。

構文:

public Text createTextNode(java.lang.String data)

パラメータ


戻り値:

getDoctype
この文書に関係のある文書型宣言です。XML 文書だけでなく HTML 文書でも、文書型宣言のない場合ヌルが返されます。DOM Level 1 では文書型宣言の編集がサポートされていないため docType は変更できません。

構文:

public DocumentType getDoctype()

getDocumentElement
文書のルート要素である子ノードに直接アクセスできるようにする簡便な属性です。HTML 文書では tagName が「HTML」の要素です。

構文:

public Element getDocumentElement()

getElementsByTagName
Document ツリーを事前に決められた順番で処理する間に行き当たる順番で、指定されたタグ名を使って、全要素の NodeList を返します。

構文:

public NodeList getElementsByTagName(java.lang.String tagname)

パラメータ


戻り値:

getImplementation
この文書を処理する DOMImplementation オブジェクトです。DOM アプリケーションでは複数の実装からオブジェクトが使用されることがあります。

構文:

public DOMImplementation getImplementation()