Class XmlParser

  • Direct Known Subclasses:
    HtmlParser

    public class XmlParser
    extends java.lang.Object
    This class can be used to parse an XML file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.xml.parsers.SAXParser parser
      This is the instance of the parser.
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlParser()
      Constructs an XmlParser.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void go​(DocListener document, java.lang.String file)
      Parses a given file.
      void go​(DocListener document, java.lang.String file, java.lang.String tagmap)
      Parses a given file.
      void go​(DocListener document, java.lang.String file, java.util.Map<java.lang.String,​XmlPeer> tagmap)
      Parses a given file.
      void go​(DocListener document, org.xml.sax.InputSource is)
      Parses a given file.
      void go​(DocListener document, org.xml.sax.InputSource is, java.io.InputStream tagmap)
      Parses a given file.
      void go​(DocListener document, org.xml.sax.InputSource is, java.lang.String tagmap)
      Parses a given file.
      void go​(DocListener document, org.xml.sax.InputSource is, java.util.Map<java.lang.String,​XmlPeer> tagmap)
      Parses a given file.
      static void parse​(DocListener document, java.io.InputStream is)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, java.io.InputStream is, java.lang.String tagmap)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, java.io.InputStream is, java.util.Map<java.lang.String,​XmlPeer> tagmap)
      Parses a given file and writes the content to a document, using a certain tagmap.
      static void parse​(DocListener document, java.io.Reader is)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, java.io.Reader is, java.lang.String tagmap)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, java.io.Reader is, java.util.Map<java.lang.String,​XmlPeer> tagmap)
      Parses a given file and writes the content to a document, using a certain tagmap.
      static void parse​(DocListener document, java.lang.String file)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, java.lang.String file, java.lang.String tagmap)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, java.lang.String file, java.util.Map<java.lang.String,​XmlPeer> tagmap)
      Parses a given file and writes the content to a document, using a certain tagmap.
      static void parse​(DocListener document, org.xml.sax.InputSource is)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, org.xml.sax.InputSource is, java.lang.String tagmap)
      Parses a given file that validates with the iText DTD and writes the content to a document.
      static void parse​(DocListener document, org.xml.sax.InputSource is, java.util.Map<java.lang.String,​XmlPeer> tagmap)
      Parses a given file and writes the content to a document, using a certain tagmap.
      • Methods inherited from class java.lang.Object

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

      • parser

        protected javax.xml.parsers.SAXParser parser
        This is the instance of the parser.
    • Constructor Detail

      • XmlParser

        public XmlParser()
        Constructs an XmlParser.
    • Method Detail

      • parse

        public static void parse​(DocListener document,
                                 org.xml.sax.InputSource is)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        is - the input source with the content
      • parse

        public static void parse​(DocListener document,
                                 org.xml.sax.InputSource is,
                                 java.lang.String tagmap)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        is - The input source with the content
        tagmap - a user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 org.xml.sax.InputSource is,
                                 java.util.Map<java.lang.String,​XmlPeer> tagmap)
        Parses a given file and writes the content to a document, using a certain tagmap.
        Parameters:
        document - The document that will listen to the parser
        is - The input source with the content
        tagmap - a user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 java.lang.String file)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        file - The path to a file with the content
      • parse

        public static void parse​(DocListener document,
                                 java.lang.String file,
                                 java.lang.String tagmap)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        file - The path to a file with the content
        tagmap - A user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 java.lang.String file,
                                 java.util.Map<java.lang.String,​XmlPeer> tagmap)
        Parses a given file and writes the content to a document, using a certain tagmap.
        Parameters:
        document - The document that will listen to the parser
        file - The path to a file with the content
        tagmap - A user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 java.io.InputStream is)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        is - The input source with the content
      • parse

        public static void parse​(DocListener document,
                                 java.io.InputStream is,
                                 java.lang.String tagmap)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        is - The input stream with the content
        tagmap - A user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 java.io.InputStream is,
                                 java.util.Map<java.lang.String,​XmlPeer> tagmap)
        Parses a given file and writes the content to a document, using a certain tagmap.
        Parameters:
        document - The document that will listen to the parser
        is - The InputStream with the content
        tagmap - A user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 java.io.Reader is)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        is - The reader that reads the content
      • parse

        public static void parse​(DocListener document,
                                 java.io.Reader is,
                                 java.lang.String tagmap)
        Parses a given file that validates with the iText DTD and writes the content to a document.
        Parameters:
        document - The document that will listen to the parser
        is - The reader that reads the content
        tagmap - A user defined tagmap
      • parse

        public static void parse​(DocListener document,
                                 java.io.Reader is,
                                 java.util.Map<java.lang.String,​XmlPeer> tagmap)
        Parses a given file and writes the content to a document, using a certain tagmap.
        Parameters:
        document - The document that will listen to the parser
        is - The reader that reads the content
        tagmap - A user defined tagmap
      • go

        public void go​(DocListener document,
                       org.xml.sax.InputSource is)
        Parses a given file.
        Parameters:
        document - The document that will listen to the parser
        is - The InputStream with the contents
      • go

        public void go​(DocListener document,
                       org.xml.sax.InputSource is,
                       java.lang.String tagmap)
        Parses a given file.
        Parameters:
        document - The document that will listen to the parser
        is - The input source with the content
        tagmap - A user defined tagmap
      • go

        public void go​(DocListener document,
                       org.xml.sax.InputSource is,
                       java.io.InputStream tagmap)
        Parses a given file.
        Parameters:
        document - The document that will listen to the parser
        is - the input source with the content
        tagmap - an inputstream to a user defined tagmap
      • go

        public void go​(DocListener document,
                       org.xml.sax.InputSource is,
                       java.util.Map<java.lang.String,​XmlPeer> tagmap)
        Parses a given file.
        Parameters:
        document - The document that will listen to the parser
        is - the input source with the content
        tagmap - a user defined tagmap
      • go

        public void go​(DocListener document,
                       java.lang.String file)
        Parses a given file.
        Parameters:
        document - The document that will listen to the parser
        file - The path to a file with the content
      • go

        public void go​(DocListener document,
                       java.lang.String file,
                       java.lang.String tagmap)
        Parses a given file.
        Parameters:
        document - the document that will listen to the parser
        file - the path to a file with the content
        tagmap - a user defined tagmap
      • go

        public void go​(DocListener document,
                       java.lang.String file,
                       java.util.Map<java.lang.String,​XmlPeer> tagmap)
        Parses a given file.
        Parameters:
        document - The document that will listen to the parser
        file - the path to a file with the content
        tagmap - a user defined tagmap