I have a file that can be read as a text box, I would like to get only the data available after
start="n= and end="n=
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 1.0//EN" "SMIL10.dtd">
<head>
</head>
<body>
<audio start="n=10.815s" end="n=19.914s"/>
</body>
</xml>
I tried doing the following :
String startTime = readString.replaceAll(".*start=\"n=|\\s.*", "").trim();
String endTime = readString.replaceAll(".*end=\"n=|\\s.*", "").trim();
Log.e("Start Time is :" , startTime);
Log.e("endTime Time is :" , endTime);
Its working fine, with just getting the start time and end time but it also shows the <?xml
tag.
How do I fix this?