Java Code Examples for org.dom4j.Element.addNamespace()
The following are Jave code examples for showing how to use
addNamespace() of the
org.dom4j.Element
class.
You can vote up the examples you like. Your votes will be used in our system to get
more good examples.
+ Save this method
Example 1
Project: atlas File: ManifestFileUtils.java View Source Code | 6 votes |
public static void updatePreProcessBaseManifestFile(File modifyManifest, File orgManifestFile) throws IOException, DocumentException { Document document = XmlHelper.readXml(orgManifestFile);// Read the XML file Element root = document.getRootElement();// Get the root node root.addNamespace("tools", "http://schemas.android.com/tools"); Element applicationElement = root.element("application"); //Determines whether there is application and needs to be deleted if (null != applicationElement) { applicationElement.addAttribute("tools:replace", "android:name,android:icon,android:allowBackup,android:label," + "android:supportsRtl"); } XmlHelper.saveDocument(document, modifyManifest); }