org.jaxup.dom
Class DocumentUpdater
java.lang.Object
|
+--org.jaxup.dom.DocumentUpdater
- All Implemented Interfaces:
- Updater
- public class DocumentUpdater
- extends Object
- implements Updater
XML document creating and updating methods for the w3c DOM document object
model.
- Author:
- Erwin Bolwidt
Method Summary |
void |
appendChild(Object element,
Object child,
int position)
|
Object |
createAttribute(Object contextNode,
String uri,
String qname,
String value)
|
Object |
createComment(Object contextNode,
String comment)
|
Object |
createDocument()
Creates an empty XML document. |
Object |
createElement(Object contextNode,
String uri,
String qname)
|
Object |
createNamespace(Object contextNode,
String prefix,
String uri)
|
Object |
createProcessingInstruction(Object contextNode,
String target,
String data)
|
Object |
createText(Object contextNode,
String text)
|
protected Document |
getDocumentNode(Node contextNode)
|
org.jaxen.Navigator |
getNavigator()
Returns a Navigator instance for the same document object model as this
updater. |
void |
insertAfter(Object refNode,
Object node)
|
void |
insertBefore(Object refNode,
Object node)
|
void |
remove(Object node)
|
void |
setAttribute(Object element,
Object attribute)
|
void |
setNamespace(Object element,
Object namespace)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentUpdater
public DocumentUpdater()
createDocument
public Object createDocument()
throws UpdateException
- Description copied from interface:
Updater
- Creates an empty XML document.
- Specified by:
createDocument
in interface Updater
getNavigator
public org.jaxen.Navigator getNavigator()
- Description copied from interface:
Updater
- Returns a Navigator instance for the same document object model as this
updater.
- Specified by:
getNavigator
in interface Updater
getDocumentNode
protected Document getDocumentNode(Node contextNode)
createComment
public Object createComment(Object contextNode,
String comment)
throws InvalidContextException
- Specified by:
createComment
in interface Updater
createText
public Object createText(Object contextNode,
String text)
throws InvalidContextException
- Specified by:
createText
in interface Updater
createElement
public Object createElement(Object contextNode,
String uri,
String qname)
throws InvalidContextException
- Specified by:
createElement
in interface Updater
createNamespace
public Object createNamespace(Object contextNode,
String prefix,
String uri)
throws InvalidContextException
- Specified by:
createNamespace
in interface Updater
createAttribute
public Object createAttribute(Object contextNode,
String uri,
String qname,
String value)
throws InvalidContextException
- Specified by:
createAttribute
in interface Updater
createProcessingInstruction
public Object createProcessingInstruction(Object contextNode,
String target,
String data)
throws InvalidContextException
- Specified by:
createProcessingInstruction
in interface Updater
insertBefore
public void insertBefore(Object refNode,
Object node)
throws InvalidContextException
- Specified by:
insertBefore
in interface Updater
insertAfter
public void insertAfter(Object refNode,
Object node)
throws InvalidContextException
- Specified by:
insertAfter
in interface Updater
appendChild
public void appendChild(Object element,
Object child,
int position)
throws InvalidContextException
- Specified by:
appendChild
in interface Updater
- Following copied from interface:
org.jaxup.Updater
- Parameters:
position
- -1 for "at end"
remove
public void remove(Object node)
throws InvalidContextException
- Specified by:
remove
in interface Updater
setAttribute
public void setAttribute(Object element,
Object attribute)
throws InvalidContextException
- Specified by:
setAttribute
in interface Updater
setNamespace
public void setNamespace(Object element,
Object namespace)
throws InvalidContextException
- Specified by:
setNamespace
in interface Updater
Copyright © 2001 Erwin Bolwidt. All Rights Reserved. Hosted by