Java tutorial
//package com.java2s; public class Main { public static String dirtilyAddNamespaceForOracleESB(String rootElement, String xmlDoc) { xmlDoc = xmlDoc.replaceFirst("<" + rootElement, "<" + rootElement + " " + "xmlns=\"http://www.oracle.com/esb\""); return xmlDoc; } }