public class Sax2Dom extends DefaultHandler implements ContentHandler, LexicalHandler
Modifier and Type | Field and Description |
---|---|
static String |
EMPTYSTRING |
static String |
XML_PREFIX |
static String |
XMLNS_PREFIX |
static String |
XMLNS_STRING |
static String |
XMLNS_URI |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
comment(char[] ch,
int start,
int length)
Lexical Handler method to create comment node in DOM tree.
|
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(String namespace,
String localName,
String qName) |
void |
endEntity(String name) |
void |
endPrefixMapping(String prefix) |
Node |
getDOM() |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
This class is only used internally so this method should never
be called.
|
void |
processingInstruction(String target,
String data)
adds processing instruction node to DOM.
|
void |
setDocumentLocator(Locator locator)
This class is only used internally so this method should never
be called.
|
void |
skippedEntity(String name)
This class is only used internally so this method should never
be called.
|
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(String name,
String publicId,
String systemId) |
void |
startElement(String namespace,
String localName,
String qName,
Attributes attrs) |
void |
startEntity(String name) |
void |
startPrefixMapping(String prefix,
String uri) |
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
public static final String EMPTYSTRING
public static final String XML_PREFIX
public static final String XMLNS_PREFIX
public static final String XMLNS_STRING
public static final String XMLNS_URI
public Sax2Dom() throws ParserConfigurationException
ParserConfigurationException
public Sax2Dom(Node root) throws ParserConfigurationException
ParserConfigurationException
public Node getDOM()
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
public void startElement(String namespace, String localName, String qName, Attributes attrs)
startElement
in interface ContentHandler
startElement
in class DefaultHandler
public void endElement(String namespace, String localName, String qName)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
public void startPrefixMapping(String prefix, String uri)
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class DefaultHandler
public void endPrefixMapping(String prefix)
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class DefaultHandler
public void ignorableWhitespace(char[] ch, int start, int length)
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class DefaultHandler
public void processingInstruction(String target, String data)
processingInstruction
in interface ContentHandler
processingInstruction
in class DefaultHandler
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class DefaultHandler
public void skippedEntity(String name)
skippedEntity
in interface ContentHandler
skippedEntity
in class DefaultHandler
public void comment(char[] ch, int start, int length)
comment
in interface LexicalHandler
public void startCDATA()
startCDATA
in interface LexicalHandler
public void endCDATA()
endCDATA
in interface LexicalHandler
public void startEntity(String name)
startEntity
in interface LexicalHandler
public void endEntity(String name)
endEntity
in interface LexicalHandler
public void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD()
endDTD
in interface LexicalHandler
Copyright © 2010 - 2020 Adobe. All Rights Reserved