Thursday, June 24, 2010

XML to HashMap in JAVA

Hi Guys,

This program will convert any XML document to a HashMap in Java.
Download - Please download it from here-
http://code.google.com/a/eclipselabs.org/p/java-utility/downloads/list

1) Program 1: XMLToMap.java
This is the main java program. It has public static void main method.
2) Program 2: ValueHandler.java
This is the program which will actually do the conversion.
3) Prgram 3: StringToSteam.java
This is just a small util which will convert String to InputStream.

How to use?
1) Please unzip the zip file.
2) Copy all the 3 files in same folder
3) Run XMLToMap.java

The program will run on Java 1.5 and higher.

3 comments:

Suchita said...

I tried this program. It doesnt convert the simple type xml to hash map.

Jayesh Raikar said...

Hi,

Do try the Conversion Conduit component

http://capsulesforthejavamind.blogspot.in/2014/10/conversion-conduit-v10_15.html

Eric Simmons said...

Great and Useful Article.

Online Java Training

Online Java Training from India

Java Online Training

Online Java Training India

Java Training Institutes in Chennai

Java Course in Chennai

Java Training in Chennai

Java Interview Questions

Java Tutorials

Core Java Interview Questions