Don't take rest after your first victory because if you fail in second, more lips are waiting to say that your first victory was just luck." - A.P.J Abdul Kalam
"All Birds find shelter during a rain. But Eagle avoids rain by flying above the Clouds." - A.P.J Abdul Kalam
"Failure will never overtake me if my definition to succeed is strong enough". - A.P.J Abdul Kalam
"Man needs difficulties in life because they are necessary to enjoy the success." - A.P.J Abdul Kalam
"If you want to shine like a sun. First burn like a sun." - A.P.J Abdul Kalam
"It is very easy to defeat someone, but it is very hard to win someone" - A.P.J Abdul Kalam
"All of us do not have equal talent. But , all of us have an equal opportunity to develop our talents." - A.P.J Abdul Kalam
" Be more dedicated to making solid achievements than in running after swift but synthetic happiness." -A.P.J Abdul Kalam
"Thinking should become your capital asset, no matter whatever ups and downs you come across in your life." - A.P.J Abdul Kalam
" Without your involvement you can't succeed. With your involvement you can't fail. " - A.P.J Abdul Kalam
Friday, July 31, 2015
Saturday, July 25, 2015
Friday, June 19, 2015
Thursday, June 11, 2015
Mule Fundamentals Video Tutorial
|
Friday, June 5, 2015
Send Command / Process to Back Ground From Terminal
Here are the list of command to send a process or command to back ground from terminal
1) Press ctrl+z
2) Then type bg (bg means back ground)
3) Then type "disown"
To make sure process is running in back ground execute below command,
ps auxw | grep
1) Press ctrl+z
2) Then type bg (bg means back ground)
3) Then type "disown"
To make sure process is running in back ground execute below command,
ps auxw | grep
Saturday, April 18, 2015
Friday, April 3, 2015
XML To JSON Converter
Have the following jars in the classpath,
commons-beanutils-1.6.1.jar
commons-collections-3.2.jar
commons-lang-2.1.jar
commons-logging-1.1.jar
ezmorph-1.0.4.jar
json-lib-2.3-jdk15.jar
xom-1.0.jar
import net.sf.json.JSON;
import net.sf.json.xml.XMLSerializer;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
public class XML2JSONConverter {
public String convertXMLTOJSON(String inputXML) {
String jsonString = "";
try {
JSON objJson = new XMLSerializer().read(inputXML);
jsonString = objJson.toString();
} catch (Exception e) {
e.printStackTrace();
}
return jsonString;
}
static String convertStreamToString(java.io.InputStream is) {
java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
return s.hasNext() ? s.next() : "";
}
public static void main(String[] args) throws Exception {
File inputFile = new File("input xml file path");
InputStream inputStreams = new FileInputStream(inputFile);
XML2JSONConverter toJASON = new XML2JSONConverter();
System.out.println("JASON Object:" + toJASON.convertXMLTOJSON(convertStreamToString(inputStreams)));
}
}
commons-beanutils-1.6.1.jar
commons-collections-3.2.jar
commons-lang-2.1.jar
commons-logging-1.1.jar
ezmorph-1.0.4.jar
json-lib-2.3-jdk15.jar
xom-1.0.jar
import net.sf.json.JSON;
import net.sf.json.xml.XMLSerializer;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
public class XML2JSONConverter {
public String convertXMLTOJSON(String inputXML) {
String jsonString = "";
try {
JSON objJson = new XMLSerializer().read(inputXML);
jsonString = objJson.toString();
} catch (Exception e) {
e.printStackTrace();
}
return jsonString;
}
static String convertStreamToString(java.io.InputStream is) {
java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
return s.hasNext() ? s.next() : "";
}
public static void main(String[] args) throws Exception {
File inputFile = new File("input xml file path");
InputStream inputStreams = new FileInputStream(inputFile);
XML2JSONConverter toJASON = new XML2JSONConverter();
System.out.println("JASON Object:" + toJASON.convertXMLTOJSON(convertStreamToString(inputStreams)));
}
}
Subscribe to:
Comments (Atom)



