com.googlecode.jinahya.xml
Class StAXElementLocator
java.lang.Object
com.googlecode.jinahya.xml.ElementLocator
com.googlecode.jinahya.xml.StAXElementLocator
public class StAXElementLocator
- extends ElementLocator
A XOM implementation.
- Author:
- Jin Kwon
- See Also:
- XOM
| 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 |
StAXElementLocator
public StAXElementLocator(ELElement root)
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 printwriter - 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 printwriter - the writer to which the locator is printedencoding - output encoding for XML declarationversion - xml version for XML declaration
- Throws:
XMLStreamException - if an XML error occurs.
Copyright © 2010-2011. All Rights Reserved.