src/share/jaxws_classes/com/sun/tools/internal/xjc/util/DOMUtils.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -121,29 +121,10 @@
if(children.getLength() >= 1)
return (Element)children.item(0);
return null;
}
-// these implementations look wrong to me, since getElementsByTagName returns
-// all the elements in descendants, not just children.
-//
-// public static Element[] getChildElements(Element parent, QName qname) {
-// NodeList children = parent.getElementsByTagNameNS(qname.uri, qname.localpart);
-// return getElements(children);
-// }
-//
-// public static Element[] getChildElements(Element parent, String namespaceURI,
-// String localName) {
-// NodeList children = parent.getElementsByTagNameNS(namespaceURI, localName);
-// return getElements(children);
-// }
-//
-// public static Element[] getChildElements(Element parent, String name) {
-// NodeList children = parent.getElementsByTagName(name);
-// return getElements(children);
-// }
-
public static Element[] getElements(NodeList children) {
Element[] elements = null;
int len = 0;
for (int i = 0; i < children.getLength(); ++i) {
if (elements == null)