com.bluecast.xml

Class FastNamespaceSupport

public class FastNamespaceSupport extends 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.5 $

Author: Yuval Oren

Field Summary
static StringXMLNS
Constructor Summary
FastNamespaceSupport()
Method Summary
voiddeclarePrefix(String prefix, String uri)
StringgetContextPrefix(int index)
intgetContextSize()
StringgetContextURI(int index)
StringgetDefaultURI()
StringgetURI(String prefix)
voidpopContext()
String[]processName(String qName, String[] parts, boolean isAttribute)
voidpushContext()
voidreset()

Field Detail

XMLNS

public static final String XMLNS

Constructor Detail

FastNamespaceSupport

public FastNamespaceSupport()

Method Detail

declarePrefix

public void declarePrefix(String prefix, String uri)

getContextPrefix

public String getContextPrefix(int index)

getContextSize

public int getContextSize()

getContextURI

public String getContextURI(int index)

getDefaultURI

public String getDefaultURI()

getURI

public String getURI(String prefix)

popContext

public void popContext()

processName

public String[] processName(String qName, String[] parts, boolean isAttribute)

pushContext

public void pushContext()

reset

public void reset()