public class DOMScanner extends Object implements LocatorEx, InfosetScanner
This class is just intended to be used by AbstractUnmarshallerImpl.
The javax.xml.bind.helpers package is generally a wrong place to put
classes like this.
LocatorEx.Snapshot| Constructor and Description |
|---|
DOMScanner() |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumnNumber() |
ContentHandler |
getContentHandler() |
Object |
getCurrentElement()
Gets the current element we are parsing.
|
Node |
getCurrentLocation()
The same as
getCurrentElement() but
better typed. |
int |
getLineNumber() |
ValidationEventLocator |
getLocation()
Gets the current location in a
ValidationEventLocator object. |
LocatorEx |
getLocator() |
String |
getPublicId() |
String |
getSystemId() |
void |
parse(Element e,
ContentHandler handler)
Deprecated.
in JAXB 2.0
Use
scan(Element) |
void |
parseWithContext(Element e,
ContentHandler handler)
Deprecated.
in JAXB 2.0
Use
scan(Element) |
void |
scan(Document doc) |
void |
scan(Element e) |
void |
scan(Object node)
Parses the given DOM-ish element/document and generates
SAX events.
|
void |
setContentHandler(ContentHandler handler)
Sets the
ContentHandler. |
void |
setLocator(Locator loc)
Configures the locator object that the SAX
ContentHandler will see. |
void |
visit(Element e)
Visits an element and its subtree.
|
public void setLocator(Locator loc)
ContentHandler will see.public void scan(Object node) throws SAXException
InfosetScannerscan in interface InfosetScannerSAXException - If the ContentHandler throws a SAXException.
Do not throw an exception just because the scanner failed
(if that can happen we need to change the API.)public void scan(Document doc) throws SAXException
SAXExceptionpublic void scan(Element e) throws SAXException
SAXExceptionpublic void parse(Element e, ContentHandler handler) throws SAXException
scan(Element)SAXExceptionpublic void parseWithContext(Element e, ContentHandler handler) throws SAXException
scan(Element)SAXExceptionpublic void visit(Element e) throws SAXException
SAXExceptionpublic Node getCurrentLocation()
getCurrentElement() but
better typed.public Object getCurrentElement()
InfosetScanner
This method could
be called from the ContentHandler.startElement(String, String, String, Attributes)
or ContentHandler.endElement(String, String, String).
Otherwise the behavior of this method is undefined.
getCurrentElement in interface InfosetScannerpublic LocatorEx getLocator()
getLocator in interface InfosetScannerpublic void setContentHandler(ContentHandler handler)
InfosetScannerContentHandler.
This handler receives the SAX events.setContentHandler in interface InfosetScannerpublic ContentHandler getContentHandler()
getContentHandler in interface InfosetScannerpublic String getPublicId()
getPublicId in interface Locatorpublic String getSystemId()
getSystemId in interface Locatorpublic int getLineNumber()
getLineNumber in interface Locatorpublic int getColumnNumber()
getColumnNumber in interface Locatorpublic ValidationEventLocator getLocation()
LocatorExValidationEventLocator object.getLocation in interface LocatorExCopyright © 2017 JBoss by Red Hat. All rights reserved.