I am using xmlbuilder2 to searilize JSON Object
const newXml = convert(doc, {
format: 'xml',
headless: true,
prettyPrint: true,
newline: ' ',
});
I want to pretty print XML with whitespace so that each tag appears on a newline like below:
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
but XMLSearilizer prints it like below in line :
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme">
Is it possible to generate each property tag in newline ?
Thanks