Top Fields Constructors Methods
com.sun.tools.xjc.reader.dtd.bindinfo

pack-priv final Class DOMBuilder

extends SAX2DOMEx
Class Inheritance
Imports
javax.xml.parsers.ParserConfigurationException, .DocumentBuilderFactory, org.glassfish.jaxb.core.marshaller.SAX2DOMEx, org.xml.sax.Attributes, .Locator

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private Locator
Inherited from org.glassfish.jaxb.core.marshaller.SAX2DOMEx:
documentnodeStack

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
setDocumentLocator(Locator locator)

Overrides org.glassfish.jaxb.core.marshaller.SAX2DOMEx.setDocumentLocator.

Implements org.xml.sax.ContentHandler.setDocumentLocator.

Receive an object for locating the origin of SAX document events.

public void
startElement(String namespace, String localName, String qName, Attributes attrs)

Overrides org.glassfish.jaxb.core.marshaller.SAX2DOMEx.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the beginning of an element.

Inherited from org.glassfish.jaxb.core.marshaller.SAX2DOMEx:
characterscharactersendDocumentendElementendPrefixMappinggetCurrentElementgetDOMignorableWhitespacenamespaceprocessingInstructionskippedEntitystartDocumentstartPrefixMapping

Field Detail

locatorback to summary
private Locator locator

Constructor Detail

DOMBuilderback to summary
public DOMBuilder(DocumentBuilderFactory f) throws ParserConfigurationException

Method Detail

setDocumentLocatorback to summary
public void setDocumentLocator(Locator locator)

Overrides org.glassfish.jaxb.core.marshaller.SAX2DOMEx.setDocumentLocator.

Implements org.xml.sax.ContentHandler.setDocumentLocator.

Doc from org.xml.sax.ContentHandler.setDocumentLocator.

Receive an object for locating the origin of SAX document events.

SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the ContentHandler interface.

The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

Note that the locator will return correct information only during the invocation SAX event callbacks after startDocument returns and before endDocument is called. The application should not attempt to use it at any other time.

Annotations
@Override
startElementback to summary
public void startElement(String namespace, String localName, String qName, Attributes attrs)

Overrides org.glassfish.jaxb.core.marshaller.SAX2DOMEx.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.ContentHandler.startElement.

Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement event for every startElement event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.

This event allows up to three name components for each element:

  1. the Namespace URI;
  2. the local name; and
  3. the qualified (prefixed) name.

Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:

  • the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
  • the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted. The attribute list will contain attributes used for Namespace declarations (xmlns* attributes) only if the http://xml.org/sax/features/namespace-prefixes property is true (it is false by default, and support for a true value is optional).

Like characters(), attribute values may have characters that need more than one char value.

Annotations
@Override