com.bluecast.xml
Class FastNamespaceSupport
java.lang.Object
|
+--com.bluecast.xml.FastNamespaceSupport
- public class FastNamespaceSupport
- extends java.lang.Object
This class improves performance over NamespaceSupport by
assuming that most XML documents have very few namespaces. Therefore,
instead of performing expensive copying operations of hash tables,
arrays and linear searches are used instead.
NOTE: This class is not a drop-in replacement for NamespaceSupport. This
class assumes that passed URIs are already internalized! Also, getURI()
returns "" instead of null if a prefix is not found.
- Version:
- $Revision: 1.2 $
- Author:
- Yuval Oren
Field Summary |
static java.lang.String |
XMLNS
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLNS
public static final java.lang.String XMLNS
- See Also:
- Constant Field Values
FastNamespaceSupport
public FastNamespaceSupport()
reset
public void reset()
pushContext
public void pushContext()
popContext
public void popContext()
declarePrefix
public void declarePrefix(java.lang.String prefix,
java.lang.String uri)
processName
public java.lang.String[] processName(java.lang.String qName,
java.lang.String[] parts,
boolean isAttribute)
getDefaultURI
public java.lang.String getDefaultURI()
getURI
public java.lang.String getURI(java.lang.String prefix)
getContextSize
public int getContextSize()
getContextPrefix
public java.lang.String getContextPrefix(int index)
getContextURI
public java.lang.String getContextURI(int index)