public void ProcessVulnerabilityXML(javax.swing.JTextField XMLFileName, javax.swing.JTextField XSSAttackName, javax.swing.JTextArea XSSAttackCode, javax.swing.JTextArea XSSAttackDesc, javax.swing.JTextField XSSAttackLabel, javax.swing.JTextArea XSSAttackBrowser, javax.swing.JList XSSAttackNames) {
        //Adapted from: http://www.developerfusion.co.uk/show/2064/

        XSSAttackNameArray.clear();
        XSSAttackCodeArray.clear();
        XSSAttackDescArray.clear();
        XSSAttackLabelArray.clear();
        XSSAttackBrowserArray.clear();

        try {
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
            Document doc = docBuilder.parse(new File(XMLFileName.getText()));

            // normalize text representation
            doc.getDocumentElement().normalize();
            System.out.println("Root element of the doc is " + doc.getDocumentElement().getNodeName());

            NodeList listOfAttacks = doc.getElementsByTagName("attack");
            int totalAttacks = listOfAttacks.getLength();
            System.out.println("Total no of Attacks : " + totalAttacks);

            for (int s = 0; s < listOfAttacks.getLength(); s++) {

                Node firstAttackNode = listOfAttacks.item(s);
                if (firstAttackNode.getNodeType() == Node.ELEMENT_NODE) {


                    Element firstAttackElement = (Element) firstAttackNode;

                    //-------
                    NodeList nameList = firstAttackElement.getElementsByTagName("name");
                    Element nameElement = (Element) nameList.item(0);

                    NodeList textFNList = nameElement.getChildNodes();
                    System.out.println("Name : " + ((Node) textFNList.item(0)).getNodeValue().trim());
                    XSSAttackNameArray.add(((Node) textFNList.item(0)).getNodeValue().trim());
                    MyJListModel.addElement(((Node) textFNList.item(0)).getNodeValue().trim());

                    //-------
                    NodeList codeList = firstAttackElement.getElementsByTagName("code");
                    Element codeElement = (Element) codeList.item(0);

                    NodeList textCodeList = codeElement.getChildNodes();
                    System.out.println("Code : " + ((Node) textCodeList.item(0)).getNodeValue().trim());
                    XSSAttackCodeArray.add(((Node) textCodeList.item(0)).getNodeValue().trim());
                    //----
                    NodeList descList = firstAttackElement.getElementsByTagName("desc");
                    Element descElement = (Element) descList.item(0);

                    NodeList textDescList = descElement.getChildNodes();
                    System.out.println("Description : " + ((Node) textDescList.item(0)).getNodeValue().trim());
                    XSSAttackDescArray.add(((Node) textDescList.item(0)).getNodeValue().trim());

                    //----
                    NodeList labelList = firstAttackElement.getElementsByTagName("label");
                    Element labelElement = (Element) labelList.item(0);

                    NodeList textLabelList = labelElement.getChildNodes();
                    System.out.println("Label : " + ((Node) textLabelList.item(0)).getNodeValue().trim());
                    XSSAttackLabelArray.add(((Node) textLabelList.item(0)).getNodeValue().trim());

                    //----
                    NodeList browserList = firstAttackElement.getElementsByTagName("browser");
                    Element browserElement = (Element) browserList.item(0);

                    NodeList textBrowserList = browserElement.getChildNodes();
                    System.out.println("Browser : " + ((Node) textBrowserList.item(0)).getNodeValue().trim());
                    XSSAttackBrowserArray.add(((Node) textBrowserList.item(0)).getNodeValue().trim());
//------


                }//end of if clause


            }//end of for loop with s var


        } catch (SAXParseException err) {
            System.out.println("** Parsing error" + ", line " + err.getLineNumber() + ", uri " + err.getSystemId());
            System.out.println(" " + err.getMessage());

        } catch (SAXException e) {
            Exception x = e.getException();
            ((x == null) ? e : x).printStackTrace();

        } catch (Throwable t) {
            t.printStackTrace();
        }

        XSSAttackName.setText(XSSAttackNameArray.get(0).toString());
        XSSAttackCode.setText(XSSAttackCodeArray.get(0).toString());
        XSSAttackDesc.setText(XSSAttackDescArray.get(0).toString());
        XSSAttackLabel.setText(XSSAttackLabelArray.get(0).toString());
        XSSAttackBrowser.setText(XSSAttackBrowserArray.get(0).toString());
        XSSAttackNames.setSelectedIndex(0);
    }