Class SAXHelper

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getSystemID​(java.io.File file)
      Constructs a SYSTEM ID from a supplied File (which should represent the XML File being parsed).
      static void parseXmlFile​(java.io.File file, DefaultContentHandler contentHandler, boolean validate, MessageRouter msgRouter)
      Parse an XML file using the specified Content Handler and storing results in the supplied Subteam object.
      static void parseXmlSource​(org.xml.sax.InputSource inputSource, DefaultContentHandler contentHandler, boolean validate, MessageRouter msgRouter)
      Parse an XML InputSource object.
      static void parseXmlStream​(java.io.InputStream inputStream, java.lang.String systemID, DefaultContentHandler contentHandler, boolean validate, MessageRouter msgRouter)
      Parses an XML InputStream using the specified Content Handler and storing results in the supplied Subteam object.
      • Methods inherited from class java.lang.Object

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

      • XML_FEATURE_VALIDATION

        public static final java.lang.String XML_FEATURE_VALIDATION
        See Also:
        Constant Field Values
    • Method Detail

      • parseXmlFile

        public static void parseXmlFile​(java.io.File file,
                                        DefaultContentHandler contentHandler,
                                        boolean validate,
                                        MessageRouter msgRouter)
                                 throws SAXParsingException
        Parse an XML file using the specified Content Handler and storing results in the supplied Subteam object.
        Parameters:
        file - The XML File to process.
        contentHandler - The ContentHandler to use to parse this file.
        validate - Whether we should validate the XML document or not.
        msgRouter - The MessageRouter object to use for routing information, warning and error messages.
        Throws:
        SAXParsingException - If something fails while parsing.
      • parseXmlStream

        public static void parseXmlStream​(java.io.InputStream inputStream,
                                          java.lang.String systemID,
                                          DefaultContentHandler contentHandler,
                                          boolean validate,
                                          MessageRouter msgRouter)
                                   throws SAXParsingException
        Parses an XML InputStream using the specified Content Handler and storing results in the supplied Subteam object.
        Parameters:
        inputStream - The XML InputStream to process.
        systemID - The SystemID associated with the input stream.
        contentHandler - The ContentHandler to use to parse this file.
        validate - Whether we should validate the XML document or not.
        msgRouter - The MessageRouter object to use for routing information, warning and error messages.
        Throws:
        SAXParsingException - If something fails while parsing.
      • parseXmlSource

        public static void parseXmlSource​(org.xml.sax.InputSource inputSource,
                                          DefaultContentHandler contentHandler,
                                          boolean validate,
                                          MessageRouter msgRouter)
                                   throws SAXParsingException
        Parse an XML InputSource object.
        Parameters:
        inputSource - The InputSource object that corresponds to the XML source.
        contentHandler - The ContentHandler to use to parse this file.
        validate - Whether we should validate the XML document or not.
        msgRouter - The MessageRouter object to use for routing information, warning and error messages.
        Throws:
        SAXParsingException - If something fails while parsing.
      • getSystemID

        public static java.lang.String getSystemID​(java.io.File file)
        Constructs a SYSTEM ID from a supplied File (which should represent the XML File being parsed).
        Parameters:
        file - The File representing the XML file being parsed.
        Returns:
        A SYSTEM ID for the file.
        Since:
        MicroStrategy Web 8.1.2