Class XMLParser<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static javax.xml.parsers.SAXParser m_saxParser  
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLParser()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static javax.xml.parsers.SAXParserFactory loadSAXParserFactory()
      Tries to load a SAXParserFactory via SAXParserFactory.newInstance().
      void parse​(java.io.InputStream is, org.xml.sax.helpers.DefaultHandler dh)  
      private static boolean supportsValidation​(javax.xml.parsers.SAXParserFactory spf)
      Tests if the current SAXParserFactory supports DTD validation.
      • Methods inherited from class java.lang.Object

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

      • m_saxParser

        private static final javax.xml.parsers.SAXParser m_saxParser
    • Constructor Detail

      • XMLParser

        public XMLParser()
    • Method Detail

      • parse

        public void parse​(java.io.InputStream is,
                          org.xml.sax.helpers.DefaultHandler dh)
                   throws org.xml.sax.SAXException,
                          java.io.IOException
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • loadSAXParserFactory

        private static javax.xml.parsers.SAXParserFactory loadSAXParserFactory()
        Tries to load a SAXParserFactory via SAXParserFactory.newInstance().
        Returns:
        a SAXParserFactory implementation
        Throws:
        TestNGException - thrown if no SAXParserFactory can be loaded
      • supportsValidation

        private static boolean supportsValidation​(javax.xml.parsers.SAXParserFactory spf)
        Tests if the current SAXParserFactory supports DTD validation.