Skip to content

Instantly share code, notes, and snippets.

@foyzulkarim
Created June 5, 2014 13:58
Show Gist options
  • Save foyzulkarim/c9ff3f109dbed3208634 to your computer and use it in GitHub Desktop.
Save foyzulkarim/c9ff3f109dbed3208634 to your computer and use it in GitHub Desktop.
Simplest xml parser for unit test practice
/**
* Created by foyzul.karim on 6/5/2014.
*/
public class MyXmlParser {
public String getValue(String node )
{
String s="";
if (node.startsWith("<xml>") && node.endsWith("</xml>"))
{
s = node.split("<xml>")[1].split("</xml>")[0];
}
return s;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment