com.googlecode.jinahya.xml
Class StAXElementLocator

java.lang.Object
  extended by com.googlecode.jinahya.xml.ElementLocator
      extended by com.googlecode.jinahya.xml.StAXElementLocator

public class StAXElementLocator
extends ElementLocator

A XOM implementation.

Author:
Jin Kwon
See Also:
XOM

Constructor Summary
StAXElementLocator(ELElement root)
           
 
Method Summary
static ElementLocator parse(XMLStreamReader reader)
          Parses from given reader and creates a new ElementLocator.
static void print(ElementLocator locator, XMLStreamWriter writer)
          Prints given locator to specified writer.
static void print(ElementLocator locator, XMLStreamWriter writer, String encoding, String version)
          Prints given locator to specified writer.
 
Methods inherited from class com.googlecode.jinahya.xml.ElementLocator
addChild, addChild, getAttribute, getAttribute, getChildCount, getChildCount, getLocalName, getNamespaceURI, getText, locateChild, locateChild, locateParent, locateRoot, removeCurrent, setAttribute, setAttribute, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StAXElementLocator

public StAXElementLocator(ELElement root)
Method Detail

parse

public static ElementLocator parse(XMLStreamReader reader)
                            throws XMLStreamException
Parses from given reader and creates a new ElementLocator.

Parameters:
reader - reader to parse
Returns:
a new ElementLocator
Throws:
XMLStreamException - if an XML error occurs.

print

public static void print(ElementLocator locator,
                         XMLStreamWriter writer)
                  throws XMLStreamException
Prints given locator to specified writer.

Parameters:
locator - locator to print
writer - the writer to which the locator is printed
Throws:
XMLStreamException - if an XML error occurs.

print

public static void print(ElementLocator locator,
                         XMLStreamWriter writer,
                         String encoding,
                         String version)
                  throws XMLStreamException
Prints given locator to specified writer.

Parameters:
locator - the locator to print
writer - the writer to which the locator is printed
encoding - output encoding for XML declaration
version - xml version for XML declaration
Throws:
XMLStreamException - if an XML error occurs.


Copyright © 2010-2011. All Rights Reserved.