Or you can use regular expressions:
String x = "xmlurl=http%3A%2F%2F127.0
x = URLDecoder.decode(x, "UTF-8");
final String RE = "xmlurl=(.+)\\?.+xslurl=(.
Pattern p = Pattern.compile(RE);
Matcher m = p.matcher(x);
if (m.matches()) {
System.out.println(m.group
System.out.println(m.group
}
Main Topics
Browse All Topics





by: vbandaruPosted on 2004-04-25 at 06:19:41ID: 10911717
The String Object has an overloaded method called indexOf. You should be able to use that in conjunction with substring to get the xmlurl and xslurl.
%3A%2F%2F1 27.0.0.1%2 Fmydbs%2Fw ipdesign.n sf%2FagtGe tDocsViewX ML%3Fopena gent%26u%3 Dc956395%2 6uname%3DJ oe+Blogg%2 6start%3D1 %26count%3 D9999%26vi ewname%3Df rmgicsissu eview%26fr mname%3D%2 6frmtype%3 DView&xslu rl=http%3A %2F%2F127. 0.0.1%2Fmy dbs%2Fwipd esign.nsf% 2Fviewrepo rt.xsl";
contentStr ing.indexO f("xslurl" )-1);
ntentStrin g.indexOf( "xslurl")+ 7);
something like this.
String contentString="xmlurl=http
String xmlurl= contentString.substring(7,
String xslurl= contentString.substring(co