I am trying to strip a huge XML file without containing all the useless information.The file will look something like this:
App_Data App="MOD" Name="Genre" Value="Series"/><App_Data App="MOD"
Name="Show_Type" Value="Series"/><App_Data App="MOD" Name="Billing_ID"
Value="10092"/><App_Data App="MOD" Name="Licensing_Window_Start"
Value="2019-05-07 00:00:00"/><App_Data App="MOD"
Name="Licensing_Window_End" Value="2019-05-13 23:59:59"/><App_Data
App="MOD" Name="Preview_Period" Value="0"/><App_Data App="MOD"
Name="Display_As_New" Value="4"/><App_Data App="MOD"
Name="Display_As_Last_Chance" Value="7"/><App_Data App="MOD"
Name="Provider_QA_Contact" Value="NBC Universal"/><App_Data App="MOD"
Name="Suggested_Price" Value="0.00"/><App_Data App="MOD"
I will need to find values for Show_Type, Licensing_Window_end, and Display_as_New
So, how can I turn my output string into something like this:
Name="Show_Type" Value="Series"
Name="Licensing_Window_End" Value="2019-05-13 23:59:59"
Name="Display_As_New" Value="4"
Currently, I have something like this:
stripText(text) {
return text.match(new RegExp("Show_Type" + "(.*)" + "/>"));
}
But this only gets the first variable. and will include some useless information such as the /> ending part.