http://www.w3.org/DOM/DOMTM git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225913 13f79535-47bb-0310-9956-ffa450edef68
556 lines
14 KiB
HTML
556 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!--
|
|
Generated: Thu Nov 09 17:43:07 EST 2000 jfouffa.w3.org
|
|
-->
|
|
<html lang='en' xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Java Language Binding</title>
|
|
<link rel='stylesheet' type='text/css' href='./spec.css' />
|
|
<link rel='stylesheet' type='text/css' href='W3C-REC.css' />
|
|
<link rel='next' href='ecma-script-binding.html' />
|
|
<link rel='contents' href='Overview.html#contents' />
|
|
<link rel='index' href='def-index.html' />
|
|
<link rel='previous' href='idl-definitions.html' />
|
|
</head>
|
|
<body>
|
|
<div class='navbar' align='center'><a accesskey='p'
|
|
href='idl-definitions.html'>previous</a> <a accesskey='n'
|
|
href='ecma-script-binding.html'>next</a> <a accesskey='c'
|
|
href='Overview.html#contents'>contents</a> <a accesskey='i'
|
|
href='def-index.html'>index</a>
|
|
|
|
<hr title='Navigation area separator' />
|
|
</div>
|
|
|
|
<div class='noprint' style='text-align: right'>
|
|
<p style='font-family: monospace;font-size:small'>13 November,
|
|
2000</p>
|
|
</div>
|
|
|
|
<div class='div1'><a id="java-binding" name='java-binding'></a>
|
|
|
|
<h1 id='java-binding-h1' class='adiv1'>Appendix D: Java Language
|
|
Binding</h1>
|
|
|
|
<p>This appendix contains the complete Java Language [<a
|
|
class='noxref' href='references.html#Java'>Java</a>] binding for
|
|
the Level 2 Document Object Model Core.</p>
|
|
|
|
<p>The Java files are also available as <a
|
|
href='java-binding.zip'>http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.zip</a></p>
|
|
|
|
<h3 id='org.w3c.dom.DOMException'>
|
|
org/w3c/dom/DOMException.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public class DOMException extends RuntimeException {
|
|
public DOMException(short code, String message) {
|
|
super(message);
|
|
this.code = code;
|
|
}
|
|
public short code;
|
|
// ExceptionCode
|
|
public static final short INDEX_SIZE_ERR = 1;
|
|
public static final short DOMSTRING_SIZE_ERR = 2;
|
|
public static final short HIERARCHY_REQUEST_ERR = 3;
|
|
public static final short WRONG_DOCUMENT_ERR = 4;
|
|
public static final short INVALID_CHARACTER_ERR = 5;
|
|
public static final short NO_DATA_ALLOWED_ERR = 6;
|
|
public static final short NO_MODIFICATION_ALLOWED_ERR = 7;
|
|
public static final short NOT_FOUND_ERR = 8;
|
|
public static final short NOT_SUPPORTED_ERR = 9;
|
|
public static final short INUSE_ATTRIBUTE_ERR = 10;
|
|
public static final short INVALID_STATE_ERR = 11;
|
|
public static final short SYNTAX_ERR = 12;
|
|
public static final short INVALID_MODIFICATION_ERR = 13;
|
|
public static final short NAMESPACE_ERR = 14;
|
|
public static final short INVALID_ACCESS_ERR = 15;
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.DOMImplementation'>
|
|
org/w3c/dom/DOMImplementation.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface DOMImplementation {
|
|
public boolean hasFeature(String feature,
|
|
String version);
|
|
|
|
public DocumentType createDocumentType(String qualifiedName,
|
|
String publicId,
|
|
String systemId)
|
|
throws DOMException;
|
|
|
|
public Document createDocument(String namespaceURI,
|
|
String qualifiedName,
|
|
DocumentType doctype)
|
|
throws DOMException;
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.DocumentFragment'>
|
|
org/w3c/dom/DocumentFragment.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface DocumentFragment extends Node {
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Document'>org/w3c/dom/Document.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Document extends Node {
|
|
public DocumentType getDoctype();
|
|
|
|
public DOMImplementation getImplementation();
|
|
|
|
public Element getDocumentElement();
|
|
|
|
public Element createElement(String tagName)
|
|
throws DOMException;
|
|
|
|
public DocumentFragment createDocumentFragment();
|
|
|
|
public Text createTextNode(String data);
|
|
|
|
public Comment createComment(String data);
|
|
|
|
public CDATASection createCDATASection(String data)
|
|
throws DOMException;
|
|
|
|
public ProcessingInstruction createProcessingInstruction(String target,
|
|
String data)
|
|
throws DOMException;
|
|
|
|
public Attr createAttribute(String name)
|
|
throws DOMException;
|
|
|
|
public EntityReference createEntityReference(String name)
|
|
throws DOMException;
|
|
|
|
public NodeList getElementsByTagName(String tagname);
|
|
|
|
public Node importNode(Node importedNode,
|
|
boolean deep)
|
|
throws DOMException;
|
|
|
|
public Element createElementNS(String namespaceURI,
|
|
String qualifiedName)
|
|
throws DOMException;
|
|
|
|
public Attr createAttributeNS(String namespaceURI,
|
|
String qualifiedName)
|
|
throws DOMException;
|
|
|
|
public NodeList getElementsByTagNameNS(String namespaceURI,
|
|
String localName);
|
|
|
|
public Element getElementById(String elementId);
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Node'>org/w3c/dom/Node.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Node {
|
|
// NodeType
|
|
public static final short ELEMENT_NODE = 1;
|
|
public static final short ATTRIBUTE_NODE = 2;
|
|
public static final short TEXT_NODE = 3;
|
|
public static final short CDATA_SECTION_NODE = 4;
|
|
public static final short ENTITY_REFERENCE_NODE = 5;
|
|
public static final short ENTITY_NODE = 6;
|
|
public static final short PROCESSING_INSTRUCTION_NODE = 7;
|
|
public static final short COMMENT_NODE = 8;
|
|
public static final short DOCUMENT_NODE = 9;
|
|
public static final short DOCUMENT_TYPE_NODE = 10;
|
|
public static final short DOCUMENT_FRAGMENT_NODE = 11;
|
|
public static final short NOTATION_NODE = 12;
|
|
|
|
public String getNodeName();
|
|
|
|
public String getNodeValue()
|
|
throws DOMException;
|
|
public void setNodeValue(String nodeValue)
|
|
throws DOMException;
|
|
|
|
public short getNodeType();
|
|
|
|
public Node getParentNode();
|
|
|
|
public NodeList getChildNodes();
|
|
|
|
public Node getFirstChild();
|
|
|
|
public Node getLastChild();
|
|
|
|
public Node getPreviousSibling();
|
|
|
|
public Node getNextSibling();
|
|
|
|
public NamedNodeMap getAttributes();
|
|
|
|
public Document getOwnerDocument();
|
|
|
|
public Node insertBefore(Node newChild,
|
|
Node refChild)
|
|
throws DOMException;
|
|
|
|
public Node replaceChild(Node newChild,
|
|
Node oldChild)
|
|
throws DOMException;
|
|
|
|
public Node removeChild(Node oldChild)
|
|
throws DOMException;
|
|
|
|
public Node appendChild(Node newChild)
|
|
throws DOMException;
|
|
|
|
public boolean hasChildNodes();
|
|
|
|
public Node cloneNode(boolean deep);
|
|
|
|
public void normalize();
|
|
|
|
public boolean isSupported(String feature,
|
|
String version);
|
|
|
|
public String getNamespaceURI();
|
|
|
|
public String getPrefix();
|
|
public void setPrefix(String prefix)
|
|
throws DOMException;
|
|
|
|
public String getLocalName();
|
|
|
|
public boolean hasAttributes();
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.NodeList'>org/w3c/dom/NodeList.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface NodeList {
|
|
public Node item(int index);
|
|
|
|
public int getLength();
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.NamedNodeMap'>
|
|
org/w3c/dom/NamedNodeMap.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface NamedNodeMap {
|
|
public Node getNamedItem(String name);
|
|
|
|
public Node setNamedItem(Node arg)
|
|
throws DOMException;
|
|
|
|
public Node removeNamedItem(String name)
|
|
throws DOMException;
|
|
|
|
public Node item(int index);
|
|
|
|
public int getLength();
|
|
|
|
public Node getNamedItemNS(String namespaceURI,
|
|
String localName);
|
|
|
|
public Node setNamedItemNS(Node arg)
|
|
throws DOMException;
|
|
|
|
public Node removeNamedItemNS(String namespaceURI,
|
|
String localName)
|
|
throws DOMException;
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.CharacterData'>
|
|
org/w3c/dom/CharacterData.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface CharacterData extends Node {
|
|
public String getData()
|
|
throws DOMException;
|
|
public void setData(String data)
|
|
throws DOMException;
|
|
|
|
public int getLength();
|
|
|
|
public String substringData(int offset,
|
|
int count)
|
|
throws DOMException;
|
|
|
|
public void appendData(String arg)
|
|
throws DOMException;
|
|
|
|
public void insertData(int offset,
|
|
String arg)
|
|
throws DOMException;
|
|
|
|
public void deleteData(int offset,
|
|
int count)
|
|
throws DOMException;
|
|
|
|
public void replaceData(int offset,
|
|
int count,
|
|
String arg)
|
|
throws DOMException;
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Attr'>org/w3c/dom/Attr.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Attr extends Node {
|
|
public String getName();
|
|
|
|
public boolean getSpecified();
|
|
|
|
public String getValue();
|
|
public void setValue(String value)
|
|
throws DOMException;
|
|
|
|
public Element getOwnerElement();
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Element'>org/w3c/dom/Element.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Element extends Node {
|
|
public String getTagName();
|
|
|
|
public String getAttribute(String name);
|
|
|
|
public void setAttribute(String name,
|
|
String value)
|
|
throws DOMException;
|
|
|
|
public void removeAttribute(String name)
|
|
throws DOMException;
|
|
|
|
public Attr getAttributeNode(String name);
|
|
|
|
public Attr setAttributeNode(Attr newAttr)
|
|
throws DOMException;
|
|
|
|
public Attr removeAttributeNode(Attr oldAttr)
|
|
throws DOMException;
|
|
|
|
public NodeList getElementsByTagName(String name);
|
|
|
|
public String getAttributeNS(String namespaceURI,
|
|
String localName);
|
|
|
|
public void setAttributeNS(String namespaceURI,
|
|
String qualifiedName,
|
|
String value)
|
|
throws DOMException;
|
|
|
|
public void removeAttributeNS(String namespaceURI,
|
|
String localName)
|
|
throws DOMException;
|
|
|
|
public Attr getAttributeNodeNS(String namespaceURI,
|
|
String localName);
|
|
|
|
public Attr setAttributeNodeNS(Attr newAttr)
|
|
throws DOMException;
|
|
|
|
public NodeList getElementsByTagNameNS(String namespaceURI,
|
|
String localName);
|
|
|
|
public boolean hasAttribute(String name);
|
|
|
|
public boolean hasAttributeNS(String namespaceURI,
|
|
String localName);
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Text'>org/w3c/dom/Text.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Text extends CharacterData {
|
|
public Text splitText(int offset)
|
|
throws DOMException;
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Comment'>org/w3c/dom/Comment.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Comment extends CharacterData {
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.CDATASection'>
|
|
org/w3c/dom/CDATASection.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface CDATASection extends Text {
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.DocumentType'>
|
|
org/w3c/dom/DocumentType.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface DocumentType extends Node {
|
|
public String getName();
|
|
|
|
public NamedNodeMap getEntities();
|
|
|
|
public NamedNodeMap getNotations();
|
|
|
|
public String getPublicId();
|
|
|
|
public String getSystemId();
|
|
|
|
public String getInternalSubset();
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Notation'>org/w3c/dom/Notation.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Notation extends Node {
|
|
public String getPublicId();
|
|
|
|
public String getSystemId();
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.Entity'>org/w3c/dom/Entity.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface Entity extends Node {
|
|
public String getPublicId();
|
|
|
|
public String getSystemId();
|
|
|
|
public String getNotationName();
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.EntityReference'>
|
|
org/w3c/dom/EntityReference.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface EntityReference extends Node {
|
|
}
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id='org.w3c.dom.ProcessingInstruction'>
|
|
org/w3c/dom/ProcessingInstruction.java:</h3>
|
|
|
|
<div class='java-code'>
|
|
<pre>
|
|
package org.w3c.dom;
|
|
|
|
public interface ProcessingInstruction extends Node {
|
|
public String getTarget();
|
|
|
|
public String getData();
|
|
public void setData(String data)
|
|
throws DOMException;
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- div1 java-binding -->
|
|
<div class='navbar' align='center'>
|
|
<hr title='Navigation area separator' />
|
|
<a accesskey='p' href='idl-definitions.html'>previous</a> <a
|
|
accesskey='n' href='ecma-script-binding.html'>next</a> <a
|
|
accesskey='c' href='Overview.html#contents'>contents</a> <a
|
|
accesskey='i' href='def-index.html'>index</a></div>
|
|
</body>
|
|
</html>
|
|
|