Hi,
i have an xml file and i want to edit a new sub node in a file
like
val="<activity android:label="@string/app_name" android_name=".MainActivity1" android:launchMode="singleTask" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"><intent-filter><action android_name="android.intent.action.MAIN"/>
<category android_name="android.intent.category.LAUNCHER"/></intent-filter></activity>"
i am using this command
xmlstarlet ed --subnode "/manifest/application" --type elem -n "$val" -v "" AndroidManifest.xml > and.xml
command running fine but new generated xml file is wroung because it add some more tag like :-
<<activity xmlns:android="http://schemas.android.com/apk/res/android" android:label="@string/app_name"
android_name=".MainActivity1" android:launchMode="singleTask" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"> <intent-filter> <action android_name="android.intent.action.MAIN"/>
<category android_name="android.intent.category.LAUNCHER"/>
</intent-filter> </activity>></<activity xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name" android_name=".MainActivity1" android:launchMode="singleTask" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"> <intent-filter> <action android_name="android.intent.action.MAIN"/>
<category android_name="android.intent.category.LAUNCHER"/> </intent-filter> </activity>>
how can i edit this. pls help me