Index: src/test/groovy/util/CustomXmlParser.java
===================================================================
--- src/test/groovy/util/CustomXmlParser.java	(revision 0)
+++ src/test/groovy/util/CustomXmlParser.java	(revision 0)
@@ -0,0 +1,17 @@
+package groovy.util;
+
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+
+class CustomXmlParser extends XmlParser {
+    CustomXmlParser() throws ParserConfigurationException, SAXException {
+        super();
+    }
+
+    protected Node createNode(Node parent, Object name, Map attributes) {
+        return new CustomNode(parent, name, attributes, new NodeList());
+    }
+}
Index: src/test/groovy/util/CustomNode.java
===================================================================
--- src/test/groovy/util/CustomNode.java	(revision 0)
+++ src/test/groovy/util/CustomNode.java	(revision 0)
@@ -0,0 +1,9 @@
+package groovy.util;
+
+import java.util.Map;
+
+class CustomNode extends Node {
+    CustomNode(Node parent, Object name, Map attributes, NodeList children) {
+        super(parent, name, attributes, children);
+    }
+}
Index: src/test/groovy/util/XmlParserTest.groovy
===================================================================
--- src/test/groovy/util/XmlParserTest.groovy	(revision 9924)
+++ src/test/groovy/util/XmlParserTest.groovy	(working copy)
@@ -235,4 +235,9 @@
 </root>
 '''
     }
+
+    void testCustomCreateNode() {
+        def html = new CustomXmlParser().parseText(bookXml)
+        assert html.getClass() == CustomNode
+    }
 }
Index: src/main/groovy/util/XmlParser.java
===================================================================
--- src/main/groovy/util/XmlParser.java	(revision 9924)
+++ src/main/groovy/util/XmlParser.java	(working copy)
@@ -319,10 +319,26 @@
             String value = list.getValue(i);
             attributes.put(attributeName, value);
         }
-        parent = new Node(parent, name, attributes, new NodeList());
+        parent = createNode(parent, name, attributes);
         stack.add(parent);
     }
 
+    /**
+     * Creates a new node with the given parent, name, and attributes. The
+     * default implementation returns an instance of
+     * <code>groovy.util.Node</code>.
+     *
+     * @param parent the parent node, or null if the node being created is the
+     * root node
+     * @param name an Object representing the name of the node (an instance of
+     * {@link QName})
+     * @param attributes a Map of attribute names to attribute values
+     * @return a new Node instance representing the current node
+     */
+    protected Node createNode(Node parent, Object name, Map attributes) {
+        return new Node(parent, name, attributes, new NodeList());
+    }
+
     public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
         addTextToNode();
 

