Package eu.bandm.tools.xantlrtdom
Class TdomReader
java.lang.Object
eu.bandm.tools.xantlrtdom.TdomReader
Glueing code for creating a
Cf.the user documentation of tdom.
Cf. xslt/base/ResultContext for extracting info from TypedDTD.
tdom
model from some textual representation.
Cf.the user documentation of tdom.
Cf. xslt/base/ResultContext for extracting info from TypedDTD.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends TypedDocument,
D extends TypedDTD>
TparseXmlFile
(InputSource inputSource, Class<T> documentClass, D dtdInstance, EntityResolver resolver, boolean debug) static <T extends TypedDocument>
TparseXmlFile
(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance) static <T extends TypedDocument>
TparseXmlFile
(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, boolean debug) static <T extends TypedDocument>
TparseXmlFile
(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, @Opt EntityResolver resolver) static <T extends TypedDocument,
E extends TypedExtension>
TparseXmlFile
(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, @Opt EntityResolver resolver, Class<E> extClass, E ext) static <T extends TypedDocument,
E extends TypedExtension>
TparseXmlFile
(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, EntityResolver resolver, Class<E> extClass, E ext, boolean debug) Glueing code for creating atdom
model from some textual representation.
-
Constructor Details
-
TdomReader
public TdomReader()
-
-
Method Details
-
parseXmlFile
public static <T extends TypedDocument> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance) -
parseXmlFile
public static <T extends TypedDocument> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, @Opt @Opt EntityResolver resolver) -
parseXmlFile
public static <T extends TypedDocument> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, boolean debug) -
parseXmlFile
public static <T extends TypedDocument,E extends TypedExtension> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, @Opt @Opt EntityResolver resolver, Class<E> extClass, E ext) -
parseXmlFile
public static <T extends TypedDocument,D extends TypedDTD> T parseXmlFile(InputSource inputSource, Class<T> documentClass, D dtdInstance, EntityResolver resolver, boolean debug) -
parseXmlFile
public static <T extends TypedDocument,E extends TypedExtension> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, EntityResolver resolver, Class<E> extClass, E ext, boolean debug) Glueing code for creating atdom
model from some textual representation.
It uses a standard xml-text-file reader, as provided by the Java infrastructure. It does use this in NON-validating mode. Instead, it does whitespace ignoring by an explicit, a posteriori processing step. Thus no DTD-access is required beyond that which is compiled INTO the tdom code and data structures.
(Thus no "<DOCTYPE" declaration should be necessary. Some particular implementation of "XMLReaderFactory" requires that, if present, it must be syntactically correct. The system part can be the empty string.)- Parameters:
inputSource
- to parsedocumentClass
- the Class object generated by tdom, a sub-class oftdom.runtime.TypedDocument
.dtdInstance
- an instance of the DTD type generated by tdom, i.e. of a sub-class oftdom.runtime.TypedDTD
. This class is normally called "DTD.java" in the generated package sources and suplies one instance in its static field "dtd"..resolver
- the Entity resolver used for resolving "external entity declarations"extClass
- ?? FIXMEext
- ?? FIXMEdebug
- a flag when set causes printing of all parsed SAX events toSystem.out
.
-