com.googlecode.jinahya.elementlocator
Class DOM4JElementLocator

java.lang.Object
  extended by com.googlecode.jinahya.elementlocator.ElementLocator<org.dom4j.Document>
      extended by com.googlecode.jinahya.elementlocator.DOM4JElementLocator

public class DOM4JElementLocator
extends ElementLocator<org.dom4j.Document>

Author:
Jin Kwon

Method Summary
static ElementLocator<org.dom4j.Document> newInstance(String namespaceURI, String localName)
          Creates a new empty (root only) instance.
static ElementLocator<org.dom4j.Document> parseInstance(org.dom4j.Document document)
          Creates a new instance.
 org.dom4j.Document toDocument()
          Prints contents to a new document.
 org.dom4j.Document toDocument(org.dom4j.Document document)
          Prints contents to given document.
 
Methods inherited from class com.googlecode.jinahya.elementlocator.ElementLocator
addChild, addChild, attribute, attribute, child, child, child, child, getAttribute, getAttribute, getChildCount, getChildCount, getText, locateChild, locateChild, locateParent, locateRoot, parent, remove, removeAttribute, removeAttribute, removeCurrent, root, setAttribute, setAttribute, setText, text, text, toJSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static ElementLocator<org.dom4j.Document> newInstance(String namespaceURI,
                                                             String localName)
Creates a new empty (root only) instance.

Parameters:
namespaceURI - root element's name space URI.
localName - root element's local namer
Returns:
a new root-only instance.

parseInstance

public static ElementLocator<org.dom4j.Document> parseInstance(org.dom4j.Document document)
Creates a new instance.

Parameters:
document - document
Returns:
new instance of DOMElementLocator.

toDocument

public final org.dom4j.Document toDocument()
Prints contents to a new document.

Returns:
a new document

toDocument

public org.dom4j.Document toDocument(org.dom4j.Document document)
Description copied from class: ElementLocator
Prints contents to given document.

Specified by:
toDocument in class ElementLocator<org.dom4j.Document>
Parameters:
document - an empty document
Returns:
given document


Copyright © 2010-2011. All Rights Reserved.