TDI-33682: Codegeneration problem

https://jira.talendforge.org/browse/TDI-33682
This commit is contained in:
wang wei
2015-09-16 09:49:32 +08:00
parent 9274a6e1c4
commit d268dea011

View File

@@ -7,6 +7,8 @@ import java.util.Map;
import org.dom4j.Element;
import org.dom4j.Namespace;
import routines.TalendString;
/**
* dom4j Document helper
* @author Administrator
@@ -112,4 +114,13 @@ public class DocumentHelper {
return true;
}
public static void applyNamespace1(org.dom4j.Element currentElement, String prefix, String uri) {
applyNamespace2(currentElement, currentElement.getName(), prefix, uri);
}
public static void applyNamespace2(org.dom4j.Element currentElement, String localName, String prefix, String uri) {
currentElement.setQName(org.dom4j.DocumentHelper.createQName(localName,
org.dom4j.DocumentHelper.createNamespace(prefix,TalendString.replaceSpecialCharForXML(uri))));
}
}