private String processInput(String xmlString) {
        String requestType;
        //parse XML into DOM tree
        //getting parsers is longwinded but straightforward
        try {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();

            //once you have parse just call parse. to parse a string vs.
            //a File requires using an InputSource. In any case result is
            //a DOM tree -- ie an instance of org.w3c.dom.Document
            Document document
                    = builder.parse(new InputSource(new StringReader(xmlString)));
            //must invoke XML validator here from java. It is a major advantage
            //of using XML

            //assuming validated we continue to parse the data ...

            //always start by getting root element
            Element root = document.getDocumentElement();
            //get the value of the id attribute
            requestType = root.getAttribute("type");
            if (requestType.equalsIgnoreCase("move")) {
                String moveLocation;
                String player;
                Element locElement =
                        (Element) document.getElementsByTagName("location").item(0);
                Element playerElement =
                        (Element) document.getElementsByTagName("player").item(0);
                moveLocation = locElement.getFirstChild().getNodeValue();
                player = playerElement.getFirstChild().getNodeValue();
                //return moveLocation+" "+player;
                int moveInt = Integer.parseInt(moveLocation);
                boolean result = board.makeMove(moveInt, player);
                return marshalUpdate(board, result);
            }
            else if(requestType.equalsIgnoreCase("connect")) {
                return marshallConnect();
            }
            else return null;
        } catch (Exception e) {
            System.out.print(e);
            return null;
        }
    }