InfosetScanner, LocatorEx, org.xml.sax.Locatorpublic class DOMScanner extends java.lang.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 | Description |
|---|---|
DOMScanner() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getColumnNumber() |
|
org.xml.sax.ContentHandler |
getContentHandler() |
|
java.lang.Object |
getCurrentElement() |
Gets the current element we are parsing.
|
org.w3c.dom.Node |
getCurrentLocation() |
The same as
getCurrentElement() but
better typed. |
int |
getLineNumber() |
|
javax.xml.bind.ValidationEventLocator |
getLocation() |
Gets the current location in a
ValidationEventLocator object. |
LocatorEx |
getLocator() |
|
java.lang.String |
getPublicId() |
|
java.lang.String |
getSystemId() |
|
void |
parse(org.w3c.dom.Element e,
org.xml.sax.ContentHandler handler) |
Deprecated.
in JAXB 2.0
Use
scan(Element) |
void |
parseWithContext(org.w3c.dom.Element e,
org.xml.sax.ContentHandler handler) |
Deprecated.
in JAXB 2.0
Use
scan(Element) |
void |
scan(java.lang.Object node) |
Parses the given DOM-ish element/document and generates
SAX events.
|
void |
scan(org.w3c.dom.Document doc) |
|
void |
scan(org.w3c.dom.Element e) |
|
void |
setContentHandler(org.xml.sax.ContentHandler handler) |
Sets the
ContentHandler. |
void |
setLocator(org.xml.sax.Locator loc) |
Configures the locator object that the SAX
ContentHandler will see. |
void |
visit(org.w3c.dom.Element e) |
Visits an element and its subtree.
|
public void setLocator(org.xml.sax.Locator loc)
ContentHandler will see.public void scan(java.lang.Object node)
throws org.xml.sax.SAXException
InfosetScannerscan in interface InfosetScannerorg.xml.sax.SAXException - 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(org.w3c.dom.Document doc)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic void scan(org.w3c.dom.Element e)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic void parse(org.w3c.dom.Element e,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
scan(Element)org.xml.sax.SAXExceptionpublic void parseWithContext(org.w3c.dom.Element e,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
scan(Element)org.xml.sax.SAXExceptionpublic void visit(org.w3c.dom.Element e)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic org.w3c.dom.Node getCurrentLocation()
getCurrentElement() but
better typed.public java.lang.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(org.xml.sax.ContentHandler handler)
InfosetScannerContentHandler.
This handler receives the SAX events.setContentHandler in interface InfosetScannerpublic org.xml.sax.ContentHandler getContentHandler()
getContentHandler in interface InfosetScannerpublic java.lang.String getPublicId()
getPublicId in interface org.xml.sax.Locatorpublic java.lang.String getSystemId()
getSystemId in interface org.xml.sax.Locatorpublic int getLineNumber()
getLineNumber in interface org.xml.sax.Locatorpublic int getColumnNumber()
getColumnNumber in interface org.xml.sax.Locatorpublic javax.xml.bind.ValidationEventLocator getLocation()
LocatorExValidationEventLocator object.getLocation in interface LocatorExCopyright © 2018 Oracle Corporation. All rights reserved.