Az XML-dokumentumok fel�p�t�s�nek folyamat�ban mindig van egy aktu�lis csom�pont. Ennek �rt�ke mindig a legutolj�ra sikeresen v�grehajtott �p�t�si utas�t�st�l f�gg. Az egyes hozz�adott elemek mindig az aktu�lis csom�ponton bel�l vannak �rtelmezve.
Teh�t p�ld�ul ha egy attrib�tumot adunk hozz� a dokumentumhoz, az attrib�tum ahhoz az XML-elemhez ( {@link hu.jokeman.xparser.document.nodes.XMLElement XMLElement}) vagy XML-feldolgoz� utas�t�shoz ( {@link hu.jokeman.xparser.document.nodes.XMLProcessingInstruction XMLProcessingInstruction}) fog tartozni, amelyik az �ppen aktu�lis csom�pont (azaz, amit legutolj�ra hozz�adtunk a dokumentumhoz). @author jokeman {aT} jokeman {d0T} hu @version $Id: DocumentBuilder.java 14 2005-11-03 22:33:48Z jokeman $
An instance of this class can be obtained from the {@link DocumentBuilderFactory#newDocumentBuilder()} method. Oncean instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.
Note that this class reuses several classes from the SAX API. This does not require that the implementor of the underlying DOM implementation use a SAX parser to parse XML document into a Document
. It merely requires that the implementation communicate with the application using these existing APIs.
@author Jeff Suttor
@version $Revision: 1.8 $, $Date: 2010-11-01 04:36:09 $
This class has no public constructor. Users should construct a DocumentBuilder by calling the factory method {@link net.sf.saxon.s9api.Processor#newDocumentBuilder()}.
All documents used in a single Saxon query, transformation, or validation episode must be built with the same {@link Configuration}. However, there is no requirement that they should use the same DocumentBuilder
.
Sharing of a DocumentBuilder
across multiple threads is not recommended. However, in the current implementation sharing a DocumentBuilder
(once initialized) will only cause problems if a SchemaValidator
is used.
The idea is that implementations implement {@link #build(Document doc)}, which adds to the given Document whatever {@link Field}s it wants to add. A DocumentBuilder is also allowed to inspect or change existing Fields in the Document, if it wishes to.
Implementations should normally have a constructor with parameters which determine what {@link #build(Document)} will add to doc.
To allow reuse of the DocumentBuilder object, implementations are also encouraged to have a setter method, which remembers its parameters just like the constructor. This setter method cannot be described in this interface, because it will take different parameters in each implementation.
The interface defines a builder pattern, which allows applications to invoke several document builders in the following way:
builder1.build(builder2.build(builder3.build(new Document())));@lucene.experimental
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|