Esempio n. 1
0
 public static Node[] getChildNodesAsArray(
     Node node, short type, boolean caseSensitive, String filter) {
   ArrayNodeList nodeList = (ArrayNodeList) getChildNodes(node, type, caseSensitive, filter);
   return (Node[]) nodeList.toArray(new Node[nodeList.getLength()]);
 }
Esempio n. 2
0
 /**
  * return all Element Children of a node
  *
  * @param node node to get children from
  * @return all matching child node
  */
 public static Element[] getChildElementsAsArray(Node node) {
   ArrayNodeList nodeList = (ArrayNodeList) getChildNodes(node, Node.ELEMENT_NODE);
   return (Element[]) nodeList.toArray(new Element[nodeList.getLength()]);
 }
Esempio n. 3
0
 /**
  * return all Children of a node by a defined type as Node Array
  *
  * @param node node to get children from
  * @param type type of returned node
  * @param filter
  * @param caseSensitive
  * @return all matching child node
  */
 public static Node[] getChildNodesAsArray(Node node, short type) {
   ArrayNodeList nodeList = (ArrayNodeList) getChildNodes(node, type);
   return (Node[]) nodeList.toArray(new Node[nodeList.getLength()]);
 }