Here you can find the source of appendChildElmt(Element aElmt, String aChildName)
Parameter | Description |
---|---|
aElmt | a parameter |
aChildName | a parameter |
public static Element appendChildElmt(Element aElmt, String aChildName)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 www.isandlatech.com (www.isandlatech.com) * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w . j a v a2 s . c o m*/ * ogattaz (isandlaTech) - initial API and implementation *******************************************************************************/ import org.w3c.dom.Document; import org.w3c.dom.Element; public class Main { private Document pDom = null; /** * @param aElmt * @param aChildName * @return */ public static Element appendChildElmt(Element aElmt, String aChildName) { Element wChild = aElmt.getOwnerDocument().createElement(aChildName); aElmt.appendChild(wChild); return wChild; } /** * @param aNodeName * @return */ public Element createElement(String aNodeName) { return getDom().createElement(aNodeName); } /** * @return */ public Document getDom() { return pDom; } }