2 edited tags
| link
1
source | link

How to extract the URL from xml or any text file

My XML file;

<settings version="2">
    <setting id="TimeShift" default="true">0</setting>
    <setting id="Override" default="true">false</setting>
    <setting id="Cache">true</setting>
    <setting id="Path">/storage/</setting>
    <setting id="PathType">0</setting>
    <setting id="Url1">http://localhost:8080/main.php?value1=abcd-1234&value2=OqUy1cHm&type=post</setting>
    <setting id="startNum">1</setting>
</settings>

I need to extract the variable URL value. I tried some sed and grep commands but don't get result. Which command should I use?