private void loadWhitespaceFreeNode(Node nodeToLoadFrom, WhitespaceFreeXMLNode nodeToLoad)
    {
        // FIRST GET ALL THE ATTRIBUTES
        NamedNodeMap attributes = nodeToLoadFrom.getAttributes();
        int numAttributes = attributes.getLength();
        for (int i = 0; i < numAttributes; i++)
        {
            Node attribute = attributes.item(i);
            String name = attribute.getNodeName();
            String value = attribute.getNodeValue();
            nodeToLoad.addAttribute(name, value);
        }

        // NOW WE NEED TO GET THE DATA (IF THERE IS ANY)
        
        // FIRST THING WE WANT TO DO IS SEE HOW MANY CHILDREN WE HAVE
        NodeList children = nodeToLoadFrom.getChildNodes();
        int numChildren = children.getLength();
        
        // IF THERE IS ONE CHILD AND IT IS NON WHITESPACE TEXT, 
        // THEN THAT'S THE DATA ASSOCIATED WITH THIS NODE
        if (numChildren == 1)
        {
            // GET THE ONLY CHILD
            Node childNode = children.item(0);
            int nodeType = childNode.getNodeType();
            
            // IS IT TEXT?
            if (childNode.getNodeType() == Node.TEXT_NODE)
            {
                String textualData = childNode.getTextContent().trim();
                nodeToLoad.setData(textualData);
            }
            // OR IS IT AN ENTITY?
            // NOTE THAT WE'LL IGNORE EVERYTHING ELSE
            else if (childNode.getNodeType() == Node.ELEMENT_NODE)
            {
                String childNodeName = childNode.getNodeName();
                WhitespaceFreeXMLNode childNodeToAdd = new WhitespaceFreeXMLNode(childNodeName);
                nodeToLoad.addChild(childNodeToAdd);
                loadWhitespaceFreeNode(childNode, childNodeToAdd);
            }
        }
        // OTHERWISE WE NEED TO GO THROUGH ALL THE CHILD NODES
        // NOTE THAT THIS ENTITY NODE CAN'T HAVE TEXTUAL DATA
        // SINCE IT HAS CHILDREN
        else
        {
            for (int i = 0; i < numChildren; i++)
            {
                Node childNode = children.item(i);
                int nodeType = childNode.getNodeType();
         
                // WE ONLY CARE ABOUT ENTITY CHILD NODES
                if (nodeType == Node.ELEMENT_NODE)
                {
                    String childNodeName = childNode.getNodeName();
                    WhitespaceFreeXMLNode childNodeToAdd = new WhitespaceFreeXMLNode(childNodeName);
                    nodeToLoad.addChild(childNodeToAdd);
                    loadWhitespaceFreeNode(childNode, childNodeToAdd);
                }
            }
        }        
    }