com.microfocus.zserver.zexplorer

## Class DefaultZConnectionParser

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - com.microfocus.zserver.zexplorer.DefaultZConnectionParser

- All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

      public class DefaultZConnectionParser
      extends org.xml.sax.helpers.DefaultHandler

  Uses the SAX Parser to parse a xml file which should be located in the eclipse root folder Copyright (C) Micro Focus
  Author:
    Godwin Okunzuwa

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultZConnectionParser()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] ac, int i, int j)`
    `void` | `endElement(java.lang.String s, java.lang.String s1, java.lang.String element)`
    `java.util.List<DefaultZConnection>` | `getConnList()`
    `java.util.List<DefaultZConnection>` | `parseDocument(java.lang.String pDefconnXmlFileName)` Parses a xml file and stores the retrieved elements in an arrayList
    `void` | `startElement(java.lang.String s, java.lang.String s1, java.lang.String elementName, org.xml.sax.Attributes attributes)` if current-element in xml file is DefaultConnection , create a new DefaultZConnection object

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultZConnectionParser

          public DefaultZConnectionParser()

  - ### Method Detail

    - #### getConnList

          public java.util.List<DefaultZConnection> getConnList()

    - #### parseDocument

          public java.util.List<DefaultZConnection> parseDocument(java.lang.String pDefconnXmlFileName)
                                                           throws java.lang.Exception

      Parses a xml file and stores the retrieved elements in an arrayList
      Parameters:
        `pDefconnXmlFileName` -
      Returns:
        List connList
      Throws:
        `org.xml.sax.SAXException` - if an exception occurs while parsing the given file
        `java.lang.Exception`

    - #### startElement

          public void startElement(java.lang.String s,
                                   java.lang.String s1,
                                   java.lang.String elementName,
                                   org.xml.sax.Attributes attributes)
                            throws org.xml.sax.SAXException

      if current-element in xml file is DefaultConnection , create a new DefaultZConnection object
      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.DefaultHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### endElement

          public void endElement(java.lang.String s,
                                 java.lang.String s1,
                                 java.lang.String element)
                          throws org.xml.sax.SAXException

      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `org.xml.sax.helpers.DefaultHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### characters

          public void characters(char[] ac,
                                 int i,
                                 int j)
                          throws org.xml.sax.SAXException

      Specified by:
        `characters` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `characters` in class `org.xml.sax.helpers.DefaultHandler`
      Throws:
        `org.xml.sax.SAXException`

Copyright © 2015 Micro Focus GmbH. All rights reserved.