Class TdomReader


  • public class TdomReader
    extends java.lang.Object
    Glueing code for creating a tdom model from some textual representation.
    Cf.the user documentation of tdom.

    Cf. xslt/base/ResultContext for extracting info from TypedDTD.
    • Constructor Summary

      Constructors 
      Constructor Description
      TdomReader()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends TypedDocument,​D extends TypedDTD>
      T
      parseXmlFile​(org.xml.sax.InputSource inputSource, java.lang.Class<T> documentClass, D dtdInstance, boolean debug)  
      static <T extends TypedDocument>
      T
      parseXmlFile​(org.xml.sax.InputSource inputSource, java.lang.Class<T> documentClass, TypedDTD dtdInstance)  
      static <T extends TypedDocument,​E extends TypedExtension>
      T
      parseXmlFile​(org.xml.sax.InputSource inputSource, java.lang.Class<T> documentClass, TypedDTD dtdInstance, java.lang.Class<E> extClass, E ext)  
      static <T extends TypedDocument,​E extends TypedExtension>
      T
      parseXmlFile​(org.xml.sax.InputSource inputSource, java.lang.Class<T> documentClass, TypedDTD dtdInstance, java.lang.Class<E> extClass, E ext, boolean debug)
      Glueing code for creating a tdom model from some textual representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TdomReader

        public TdomReader()
    • Method Detail

      • parseXmlFile

        public static <T extends TypedDocument> T parseXmlFile​(org.xml.sax.InputSource inputSource,
                                                               java.lang.Class<T> documentClass,
                                                               TypedDTD dtdInstance)
      • parseXmlFile

        public static <T extends TypedDocument,​E extends TypedExtension> T parseXmlFile​(org.xml.sax.InputSource inputSource,
                                                                                              java.lang.Class<T> documentClass,
                                                                                              TypedDTD dtdInstance,
                                                                                              java.lang.Class<E> extClass,
                                                                                              E ext)
      • parseXmlFile

        public static <T extends TypedDocument,​D extends TypedDTD> T parseXmlFile​(org.xml.sax.InputSource inputSource,
                                                                                        java.lang.Class<T> documentClass,
                                                                                        D dtdInstance,
                                                                                        boolean debug)
      • parseXmlFile

        public static <T extends TypedDocument,​E extends TypedExtension> T parseXmlFile​(org.xml.sax.InputSource inputSource,
                                                                                              java.lang.Class<T> documentClass,
                                                                                              TypedDTD dtdInstance,
                                                                                              java.lang.Class<E> extClass,
                                                                                              E ext,
                                                                                              boolean debug)
        Glueing code for creating a tdom 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 parse
        documentClass - the Class object generated by tdom, a sub-class of tdom.runtime.TypedDocument.
        dtdInstance - an instance of the DTD type generated by tdom, i.e. of a sub-class of tdom.runtime.TypedDTD. This class is normally called "DTD.java" in the generated package sources and suplies one instance in its static field "dtd"..
        debug - a flag when set causes printing of all parsed SAX events to System.out.