public class XmlPathMapper extends Object implements StAXHandler
{}. The others are element
QNames of the form local-name{namespace}, where {namespace} is omitted when the namespace
is empty. The sequence of element QNames may be followed by a single attribute QName of the form:
@local-name{namespace}. Namespaces are encoded using URL-encoding so they will not
contain unexpected characters (such as space and {}).
TODO: a bunch of optimizations are possible here; there is a duplication of work in the subclasses,
unneeded String creation, etc. Come back and fix that once we've settled on a definite implementation!| Modifier and Type | Field and Description |
|---|---|
protected MutableString |
currentPath |
| Constructor and Description |
|---|
XmlPathMapper() |
| Modifier and Type | Method and Description |
|---|---|
int |
getAttQNameCount(String s) |
Map<CharSequence,Integer> |
getAttQNameCounts() |
CharSequence |
getCurrentQName() |
int |
getEltQNameCount(String s) |
Map<CharSequence,Integer> |
getEltQNameCounts() |
protected void |
getEventAttQName(MutableString buf,
XMLStreamReader reader,
int i) |
int |
getPathCount(String s) |
Map<CharSequence,Integer> |
getPathCounts() |
void |
handleEvent(XMLStreamReader reader,
int eventType)
This method receives StAX events.
|
boolean |
isNamespaceAware() |
void |
reset()
reinitialize any internal state and prepare the handler for re-use
|
void |
setNamespaceAware(boolean namespaceAware) |
protected MutableString currentPath
public Map<CharSequence,Integer> getEltQNameCounts()
public Map<CharSequence,Integer> getAttQNameCounts()
public Map<CharSequence,Integer> getPathCounts()
public int getEltQNameCount(String s)
public int getAttQNameCount(String s)
public int getPathCount(String s)
public CharSequence getCurrentQName()
public boolean isNamespaceAware()
public void setNamespaceAware(boolean namespaceAware)
public void handleEvent(XMLStreamReader reader, int eventType)
StAXHandlerhandleEvent in interface StAXHandlerreader - the reader from which events are being readeventType - the XML stream event typeprotected void getEventAttQName(MutableString buf, XMLStreamReader reader, int i)
public void reset()
StAXHandlerreset in interface StAXHandlerCopyright © 2013. All Rights Reserved.