java.lang.Object
org.xml.sax.helpers.NamespaceSupport
- See Also:
- Top Examples, Source Code
public boolean declarePrefix(String prefix,
String uri)
- See Also:
getPrefix(java.lang.String)
, getURI(java.lang.String)
, processName(java.lang.String, java.lang.String[], boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Enumeration getDeclaredPrefixes()
- See Also:
getURI(java.lang.String)
, getPrefixes()
, getPrefix(java.lang.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getPrefix(String uri)
- See Also:
getURI(java.lang.String)
, getPrefixes(java.lang.String)
, getPrefixes()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Enumeration getPrefixes()
- See Also:
getURI(java.lang.String)
, getDeclaredPrefixes()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Enumeration getPrefixes(String uri)
- See Also:
getURI(java.lang.String)
, getDeclaredPrefixes()
, getPrefix(java.lang.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getURI(String prefix)
- See Also:
getPrefixes()
, getPrefix(java.lang.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean isNamespaceDeclUris()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public NamespaceSupport()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final String NSDECL
- See Also:
isNamespaceDeclUris()
, setNamespaceDeclUris(boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void popContext()
- See Also:
pushContext()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String[] processName(String qName,
String[] parts,
boolean isAttribute)
- See Also:
String.intern()
, declarePrefix(java.lang.String, java.lang.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void pushContext()
- See Also:
popContext()
, ContentHandler
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void reset()
- See Also:
setNamespaceDeclUris(boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setNamespaceDeclUris(boolean value)
- See Also:
- IllegalStateException,
processName()
, NSDECL
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final String XMLNS
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1596]A simple demonstration of the effects of the namespace features for a SAX application
By Anonymous on 2005/11/04 20:23:08 Rate
import java.io.*;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
public class NamespaceTest
extends DefaultHandler
{
public static void main ( String [ ] args )
{
try
{
SAXParserFactory factory = SAXParserFactory.newInstance ( ) ;
try
{
factory.setFeature
( "http://xml.org/sax/features/namespaces", true ) ;
factory.setFeature
( "http://xml.org/sax/features/namespace-prefixes", true ) ;
}
catch ( SAXException ex )
{
ex.printStackTrace ( ) ;
}
SAXParser parser = factory.newSAXParser ( ) ;
if ( args.length != 0 )
parser.parse ( new File ( args [ 0 ] ) , new NamespaceTest ( ) ) ;
}
catch ( Exception ex )
{
ex.printStackTrace ( ) ;
}
}
public void startElement
( String URI, String name, String qName, Attributes attributes )
throws SAXException
{
System.out.println ( " { " + URI + " } " + name + " ( " + qName + " ) " ) ;
}
}