Created
June 5, 2014 13:58
-
-
Save foyzulkarim/c9ff3f109dbed3208634 to your computer and use it in GitHub Desktop.
Simplest xml parser for unit test practice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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