This class is just intended to be used by AbstractUnmarshallerImpl.
The jakarta.xml.bind.helpers package is generally a wrong place to put
classes like this.
| Modifier and Type | Field and Description |
|---|---|
| private final AttributesImpl | atts
To save memory, only one instance of AttributesImpl will be used. |
| private Node | currentNode
reference to the current node being scanned - used for determining location info for validation events |
| private Locator | |
| private ContentHandler | receiver
This handler will receive SAX2 events. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | buildNamespaceSupport(NamespaceSupport nss, Node node)
Recursively visit ancestors and build up |
| public int | getColumnNumber()
Implements org. Return the column number where the current document event ends. |
| public ContentHandler | |
| public Node | getCurrentElement()
Implements org. Gets the current element we are parsing. |
| public Node | |
| public int | getLineNumber()
Implements org. Return the line number where the current document event ends. |
| public ValidationEventLocator | getLocation()
Implements org. Gets the current location in a |
| public LocatorEx | |
| public String | getPublicId()
Implements org. Return the public identifier for the current document event. |
| public String | getSystemId()
Implements org. Return the system identifier for the current document event. |
| public void | parse(Element e, ContentHandler handler)
Deprecated
for removal since 2.0. in JAXB 2.0
Use
scan(Element)
Parses a subtree starting from the element e and reports SAX2 events to the specified handler. |
| public void | parseWithContext(Element e, ContentHandler handler)
Deprecated
for removal since 2.0. in JAXB 2.0
Use
scan(Element)
Similar to the parse method but it visits the ancestor nodes and properly emulate the all in-scope namespace declarations. |
| public void | scan(Node node)
Implements org. Parses the given DOM-ish element/document and generates SAX events. |
| public void | scan(Document doc)
Implements org. Parses the given DOM-ish element/document and generates SAX events. |
| public void | scan(Element e)
Implements org. Parses the given DOM-ish element/document and generates SAX events. |
| public void | setContentHandler(ContentHandler handler)
Implements org. Sets the |
| private void | |
| public void | |
| public void | |
| private Element |
| atts | back to summary |
|---|---|
| private final AttributesImpl atts To save memory, only one instance of AttributesImpl will be used. | |
| currentNode | back to summary |
|---|---|
| private Node currentNode reference to the current node being scanned - used for determining location info for validation events | |
| locator | back to summary |
|---|---|
| private Locator locator | |
| receiver | back to summary |
|---|---|
| private ContentHandler receiver This handler will receive SAX2 events. | |
| DOMScanner | back to summary |
|---|---|
| public DOMScanner() | |
| buildNamespaceSupport | back to summary |
|---|---|
| private void buildNamespaceSupport(NamespaceSupport nss, Node node) Recursively visit ancestors and build up | |
| getColumnNumber | back to summary |
|---|---|
| public int getColumnNumber() Implements org. Doc from org. Return the column number where the current document event ends.
This is one-based number of Java Warning The return value from the method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. For example, when lines contain combining character sequences, wide characters, surrogate pairs, or bi-directional text, the value may not correspond to the column in a text editor's display. The return value is an approximation of the column number in the document entity or external parsed entity where the markup triggering the event appears. If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first column in each line is column 1.
| |
| getContentHandler | back to summary |
|---|---|
| public ContentHandler getContentHandler() Implements org.
| |
| getCurrentElement | back to summary |
|---|---|
| public Node getCurrentElement() Implements org. Doc from org. Gets the current element we are parsing.
This method could
be called from the Otherwise the behavior of this method is undefined.
| |
| getCurrentLocation | back to summary |
|---|---|
| public Node getCurrentLocation() The same as | |
| getLineNumber | back to summary |
|---|---|
| public int getLineNumber() Implements org. Doc from org. Return the line number where the current document event ends. Lines are delimited by line ends, which are defined in the XML specification. Warning The return value from the method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. In some cases, these "line" numbers match what would be displayed as columns, and in others they may not match the source text due to internal entity expansion. The return value is an approximation of the line number in the document entity or external parsed entity where the markup triggering the event appears. If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first line is line 1.
| |
| getLocation | back to summary |
|---|---|
| public ValidationEventLocator getLocation() Implements org. Doc from org. Gets the current location in a
| |
| getLocator | back to summary |
|---|---|
| public LocatorEx getLocator() Implements org.
| |
| getPublicId | back to summary |
|---|---|
| public String getPublicId() Implements org. Doc from org. Return the public identifier for the current document event. The return value is the public identifier of the document entity or of the external parsed entity in which the markup triggering the event appears.
| |
| getSystemId | back to summary |
|---|---|
| public String getSystemId() Implements org. Doc from org. Return the system identifier for the current document event. The return value is the system identifier of the document entity or of the external parsed entity in which the markup triggering the event appears. If the system identifier is a URL, the parser must resolve it fully before passing it to the application. For example, a file name must always be provided as a file:... URL, and other kinds of relative URI are also resolved against their bases.
| |
| parse | back to summary |
|---|---|
| public void parse(Element e, ContentHandler handler) throws SAXException
Parses a subtree starting from the element e and reports SAX2 events to the specified handler.
| |
| parseWithContext | back to summary |
|---|---|
| public void parseWithContext(Element e, ContentHandler handler) throws SAXException
Similar to the parse method but it visits the ancestor nodes and properly emulate the all in-scope namespace declarations.
| |
| scan | back to summary |
|---|---|
| public void scan(Node node) throws SAXException Implements org. Doc from org. Parses the given DOM-ish element/document and generates SAX events.
| |
| scan | back to summary |
|---|---|
| public void scan(Document doc) throws SAXException Implements org. Doc from org. Parses the given DOM-ish element/document and generates SAX events.
| |
| scan | back to summary |
|---|---|
| public void scan(Element e) throws SAXException Implements org. Doc from org. Parses the given DOM-ish element/document and generates SAX events.
| |
| setContentHandler | back to summary |
|---|---|
| public void setContentHandler(ContentHandler handler) Implements org. Doc from org. Sets the
| |
| setCurrentLocation | back to summary |
|---|---|
| private void setCurrentLocation(Node currNode) | |
| setLocator | back to summary |
|---|---|
| public void setLocator(Locator loc) Configures the locator object that the SAX | |
| visit | back to summary |
|---|---|
| public void visit(Element element) throws SAXException Visits an element and its subtree. | |
| visit | back to summary |
|---|---|
| private Element visit(Node n) throws SAXException | |