org.jaxup
Interface Updater

All Known Implementing Classes:
DocumentUpdater, DocumentUpdater, DocumentUpdater, DocumentUpdater

public interface Updater

XML document updating and creating functionality, with an interface based on the XPath data model. The interface is intended to be sufficiently high-level, that implementations for different concrete document object models can be implemented.

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)
           
 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)
           
 

Method Detail

createDocument

public Object createDocument()
                      throws UpdateException
Creates an empty XML document.

createComment

public Object createComment(Object contextNode,
                            String comment)
                     throws InvalidContextException

createText

public Object createText(Object contextNode,
                         String text)
                  throws InvalidContextException

createElement

public Object createElement(Object contextNode,
                            String uri,
                            String qname)
                     throws InvalidContextException

createNamespace

public Object createNamespace(Object contextNode,
                              String prefix,
                              String uri)
                       throws InvalidContextException

createAttribute

public Object createAttribute(Object contextNode,
                              String uri,
                              String qname,
                              String value)
                       throws InvalidContextException

createProcessingInstruction

public Object createProcessingInstruction(Object contextNode,
                                          String target,
                                          String data)
                                   throws InvalidContextException

insertBefore

public void insertBefore(Object refNode,
                         Object node)
                  throws UpdateException

insertAfter

public void insertAfter(Object refNode,
                        Object node)
                 throws UpdateException

appendChild

public void appendChild(Object element,
                        Object child,
                        int position)
                 throws UpdateException
Parameters:
position - -1 for "at end"

remove

public void remove(Object node)
            throws UpdateException

setAttribute

public void setAttribute(Object element,
                         Object attribute)
                  throws UpdateException

setNamespace

public void setNamespace(Object element,
                         Object namespace)
                  throws UpdateException

getNavigator

public org.jaxen.Navigator getNavigator()
Returns a Navigator instance for the same document object model as this updater.


Copyright © 2001 Erwin Bolwidt. All Rights Reserved. Hosted by

SourceForge Logo