I\'d like to parse a string so I can build an XML document.
I have:
String value = \"path=/Some/Xpath/Here\";
I\'ve parsed it this way
if you are looking into performance you should avoid usage of split since it uses regular-expressions which is a bit oversized for such a simple problem. if you just want to remove "path=" and you are sure that your string always starts that way you could go with the following:
String s = "path=/Some/Xpath/Here";
String prefix = "path=";
String result = s.substring(prefix.length);