Here you can find the source of processAny(Element element, List
Parameter | Description |
---|---|
element | the element where to add the elements. |
any | the any elements to process. |
Parameter | Description |
---|---|
Exception | if there is some error during processing. |
public static void processAny(Element element, List<Element> any) throws Exception
//package com.java2s; /*// w w w. j a v a2 s . c o m * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ import java.util.*; import org.w3c.dom.*; public class Main { /** * Processes any element and add them into the element. * * @param element the element where to add the elements. * @param any the any elements to process. * @throws Exception if there is some error during processing. */ public static void processAny(Element element, List<Element> any) throws Exception { for (Element anyElement : any) { Node importedElement = element.getOwnerDocument().importNode( anyElement, true); element.appendChild(importedElement); } } }