Index: trunk/src/org/openstreetmap/josm/tools/XmlUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/XmlUtils.java	(revision 14347)
+++ trunk/src/org/openstreetmap/josm/tools/XmlUtils.java	(revision 14348)
@@ -18,4 +18,7 @@
 
 import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -141,3 +144,20 @@
         return factory;
     }
+
+    /**
+     * Get the first child element
+     * @param parent parent node
+     * @return the first child element
+     * @since 14348
+     */
+    public static Element getFirstChildElement(Node parent) {
+        NodeList children = parent.getChildNodes();
+        for (int i = 0; i < children.getLength(); i++) {
+            Node child = children.item(i);
+            if (child instanceof Element) {
+                return (Element) child;
+            }
+        }
+        return null;
+    }
 }
