|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.bind.unmarshaller.DOMScanner
public class DOMScanner
Visits a W3C DOM tree and generates SAX2 events from it.
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.sun.xml.bind.v2.runtime.unmarshaller.LocatorEx |
|---|
LocatorEx.Snapshot |
| Constructor Summary | |
|---|---|
DOMScanner()
|
|
| Method Summary | |
|---|---|
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(org.w3c.dom.Document doc)
|
void |
scan(org.w3c.dom.Element e)
|
void |
scan(java.lang.Object node)
Parses the given DOM-ish element/document and generates SAX events. |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DOMScanner()
| Method Detail |
|---|
public void setLocator(org.xml.sax.Locator loc)
ContentHandler will see.
public void scan(java.lang.Object node)
throws org.xml.sax.SAXException
InfosetScanner
scan 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.SAXException
public void scan(org.w3c.dom.Element e)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void parse(org.w3c.dom.Element e,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
scan(Element)
org.xml.sax.SAXException
public void parseWithContext(org.w3c.dom.Element e,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
scan(Element)
org.xml.sax.SAXException
public 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 LocatorEx
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||