Author: jacopoc
Date: Wed Aug 26 16:16:23 2009
New Revision: 808093
URL:
http://svn.apache.org/viewvc?rev=808093&view=revLog:
Created method that "creates a child element with the given namespace supportive name and appends it to the element child node list". Patch from Ashish Vijaywargiya
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=808093&r1=808092&r2=808093&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java Wed Aug 26 16:16:23 2009
@@ -586,6 +586,14 @@
newElement.appendChild(document.createTextNode(childElementValue));
return newElement;
}
+
+ /** Creates a child element with the given namespace supportive name and appends it to the element child node list. */
+ public static Element addChildElementNSElement(Element element, String childElementName,
+ Document document, String nameSpaceUrl) {
+ Element newElement = document.createElementNS(nameSpaceUrl, childElementName);
+ element.appendChild(newElement);
+ return element;
+ }
/** Creates a child element with the given namespace supportive name and appends it to the element child node list.
* Also creates a Text node with the given value and appends it to the new elements child node list.