com.sun.xml.bind.unmarshaller

Class DOMScanner

public class DOMScanner extends Object implements LocatorEx, InfosetScanner

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.

Since: JAXB1.0

Constructor Summary
DOMScanner()
Method Summary
intgetColumnNumber()
ContentHandlergetContentHandler()
ObjectgetCurrentElement()
NodegetCurrentLocation()
The same as getCurrentElement but better typed.
intgetLineNumber()
ValidationEventLocatorgetLocation()
LocatorExgetLocator()
StringgetPublicId()
StringgetSystemId()
voidparse(Element e, ContentHandler handler)
Parses a subtree starting from the element e and reports SAX2 events to the specified handler.
voidparseWithContext(Element e, ContentHandler handler)
Similar to the parse method but it visits the ancestor nodes and properly emulate the all in-scope namespace declarations.
voidscan(Object node)
voidscan(Document doc)
voidscan(Element e)
voidsetContentHandler(ContentHandler handler)
voidsetLocator(Locator loc)
Configures the locator object that the SAX ContentHandler will see.
voidvisit(Element e)
Visits an element and its subtree.

Constructor Detail

DOMScanner

public DOMScanner()

Method Detail

getColumnNumber

public int getColumnNumber()

getContentHandler

public ContentHandler getContentHandler()

getCurrentElement

public Object getCurrentElement()

getCurrentLocation

public Node getCurrentLocation()
The same as getCurrentElement but better typed.

getLineNumber

public int getLineNumber()

getLocation

public ValidationEventLocator getLocation()

getLocator

public LocatorEx getLocator()

getPublicId

public String getPublicId()

getSystemId

public String getSystemId()

parse

public void parse(Element e, ContentHandler handler)

Deprecated: in JAXB 2.0 Use scan

Parses a subtree starting from the element e and reports SAX2 events to the specified handler.

parseWithContext

public void parseWithContext(Element e, ContentHandler handler)

Deprecated: in JAXB 2.0 Use scan

Similar to the parse method but it visits the ancestor nodes and properly emulate the all in-scope namespace declarations.

scan

public void scan(Object node)

scan

public void scan(Document doc)

scan

public void scan(Element e)

setContentHandler

public void setContentHandler(ContentHandler handler)

setLocator

public void setLocator(Locator loc)
Configures the locator object that the SAX ContentHandler will see.

visit

public void visit(Element e)
Visits an element and its subtree.