/** * <p> * Append a new text child * </p> * @param parent for the new child element * @param elementName is the new element tag name * @param value the int value for the new element * @result the newly create child node */ public static Node appendTextChild(Node parent, String elementName, int value) { return appendTextChild(parent, elementName, String.valueOf(value)); }
/** * <p> * Append a new text child * </p> * @param parent for the new child element * @param elementName is the new element tag name * @param value the int value for the new element * @result the newly create child node */ public static Node appendTextChild(Node parent, String elementName, int value) { return appendTextChild(parent, elementName, String.valueOf(value)); }
public void appendQNameChild(String elementName, Node parent, String namespaceUri, String localPart, String prefix) { if( prefix == null ) { // @@@ make configurable?? prefix = elementName + "_ns__"; } String elementValue = composeQNameValue(prefix, localPart); Element element = (Element) appendTextChild (parent, elementName, elementValue); // Always set prefix mapping on leaf node. If the DOL was // populated from an existing deployment descriptor it does // not preserve the original node structure of the XML document, // so we can't reliably know what level to place mapping. // Alternatively, if we're writing out a descriptor that was created // by the deploytool, there is no prefix->namespace information in // the first place. setAttributeNS(element, prefix, namespaceUri); } }
public void appendQNameChild(String elementName, Node parent, String namespaceUri, String localPart, String prefix) { if( prefix == null ) { // @@@ make configurable?? prefix = elementName + "_ns__"; } String elementValue = composeQNameValue(prefix, localPart); Element element = (Element) appendTextChild (parent, elementName, elementValue); // Always set prefix mapping on leaf node. If the DOL was // populated from an existing deployment descriptor it does // not preserve the original node structure of the XML document, // so we can't reliably know what level to place mapping. // Alternatively, if we're writing out a descriptor that was created // by the deploytool, there is no prefix->namespace information in // the first place. setAttributeNS(element, prefix, namespaceUri); } }