private static void parseImage(Node node, Channel channel, boolean updateChannel) 
        throws MalformedURLException {

        NodeList imageNodes = node.getChildNodes();

        int numImageNodes = imageNodes.getLength();

        for (int i = 0; i < numImageNodes; i++) {
            Node child = imageNodes.item(i);

            switch (child.getNodeType()) {
                case Node.ELEMENT_NODE:
                    String childName = child.getNodeName();

                    if (childName.equals("url")) {
                        Node textNode = child.getFirstChild();

                        if (updateChannel) {
                            channel.setImageURL(new URL(textNode.getNodeValue()));
                        }
                    } else if (childName.equals("link")) {
                        Node textNode = child.getFirstChild();
                        
                        if (updateChannel) {
                            channel.setImageLink(new URL(textNode.getNodeValue()));
                        }
                    } else if (childName.equals("description")) {
                        Node textNode = child.getFirstChild();

                        if (updateChannel) {
                            channel.setImageDescription(textNode.getNodeValue());
                        }
                    }
            }
        }
    }