Class ConfigurationParser


  • public class ConfigurationParser
    extends java.lang.Object
    Parser for XML configuration
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.w3c.dom.Document activeDocument  
    • Method Summary

      Modifier and Type Method Description
      static ParserResult getElements​(java.lang.String tag)
      Returns parsed result with all elements having provided tag.
      static void parseDocument​(java.lang.String name)
      Parses xml file to document.
      • Methods inherited from class java.lang.Object

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

      • activeDocument

        private static org.w3c.dom.Document activeDocument
    • Constructor Detail

      • ConfigurationParser

        public ConfigurationParser()
    • Method Detail

      • parseDocument

        public static void parseDocument​(java.lang.String name)
                                  throws javax.xml.parsers.ParserConfigurationException,
                                         java.io.IOException,
                                         org.xml.sax.SAXException
        Parses xml file to document.
        Parameters:
        name - file name
        Throws:
        javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
        java.io.IOException - IOException
        org.xml.sax.SAXException - SAXException
      • getElements

        public static ParserResult getElements​(java.lang.String tag)
        Returns parsed result with all elements having provided tag.
        Parameters:
        tag - element tag
        Returns:
        parsed result element