You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ibrahim M. Ghazal (Jira)" <ji...@apache.org> on 2022/02/01 11:12:00 UTC

[jira] [Closed] (CB-13484) Allow removing a whole XML element using

     [ https://issues.apache.org/jira/browse/CB-13484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ibrahim M. Ghazal closed CB-13484.
----------------------------------
    Resolution: Abandoned

> Allow removing a whole XML element using <config-file>
> ------------------------------------------------------
>
>                 Key: CB-13484
>                 URL: https://issues.apache.org/jira/browse/CB-13484
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-common
>    Affects Versions: 2.1.1
>            Reporter: Ibrahim M. Ghazal
>            Priority: Major
>              Labels: new-feature
>
> Currently, {{<config-file>}} can only *add* an XML element to a config file, but not *remove* an element. {{<edit-config>}} can remove attributes from an element, but not whole elements.
> I'd like the ability to remove elements by adding something to {{config.xml}} instead of writing a hook.
> This is useful because some plugins include extra permissions which are not always needed (For example, {{cordova-plugin-file}} adds the {{WRITE_EXTERNAL_STORAGE}} permission, but not all apps that include {{cordova-plugin-file}} will actually write outside their data directory).
> Example syntax:
> {code}
> <config-file mode="remove" parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
>     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
> </config-file>
> {code}
> (Note the {{mode="remove"}}, the default if absent should be "add")



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org