public class NamespaceReplacer extends org.xml.sax.helpers.XMLFilterImpl
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
new2old |
protected MyNamespaceSupport |
newNSSupport |
protected Map<String,String> |
old2new |
protected MyNamespaceSupport |
oldNSSupport |
| Constructor and Description |
|---|
NamespaceReplacer(Map<String,String> old2new) |
NamespaceReplacer(XMLReader xmlReader,
Map<String,String> old2new) |
| Modifier and Type | Method and Description |
|---|---|
void |
endElement(String uri,
String localName,
String qName) |
void |
setFeature(String name,
boolean value) |
void |
startDocument() |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
protected String |
translate(String namespace,
Map<String,String> map) |
protected String |
translateAttribute(String namespace,
Map<String,String> map) |
protected String |
translateAttribute(String qName,
MyNamespaceSupport from,
MyNamespaceSupport to) |
characters, endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setParent, setProperty, skippedEntity, unparsedEntityDecl, warningprotected final MyNamespaceSupport oldNSSupport
protected final MyNamespaceSupport newNSSupport
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
setFeature in interface XMLReadersetFeature in class org.xml.sax.helpers.XMLFilterImplSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.XMLFilterImplSAXExceptionprotected String translateAttribute(String qName, MyNamespaceSupport from, MyNamespaceSupport to)
public void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.XMLFilterImplSAXExceptionCopyright © 2019. All rights reserved.