I still prefer my choice, even if yours now has 2 votes :-p

Regards
Scott

On 26/08/2009, at 11:42 PM, Ashish Vijaywargiya wrote:

;o) - I would wait for Scott's comment on this.
Hey Jacques please don't ask why I am smiling - its secret ;) & Scott knows the reason of my smile.

--
Ashish


Jacques Le Roux wrote:
I'd have prefered addChildElementNameSpaceValue as name

Jacques

From: <[email protected]>
Author: lektran
Date: Wed Aug 26 09:22:09 2009
New Revision: 807938

URL: http://svn.apache.org/viewvc?rev=807938&view=rev
Log:
Applied patch from Ashish Vijaywargiya that allows adding namespace aware child elements via UtilXml

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=807938&r1=807937&r2=807938&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 09:22:09 2009
@@ -586,6 +586,17 @@
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. + * Also creates a Text node with the given value and appends it to the new elements child node list.
+     */
+ public static Element addChildElementNSValue(Element element, String childElementName, + String childElementValue, Document document, String nameSpaceUrl) { + Element newElement = document.createElementNS(nameSpaceUrl, childElementName); + newElement.appendChild(document.createTextNode(childElementValue));
+        element.appendChild(newElement);
+        return element;
+    }

/** Creates a child element with the given name and appends it to the element child node list. * Also creates a CDATASection node with the given value and appends it to the new elements child node list.




Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to