vbguy
asked on
xml parsing with using java
Hi ,
I have to parse an xml file to get the various files.
This will be a stand alone java program that parses an xml file, reads the values and
create a flat file based on the data. I will be parsing about 2000 32kb xml files at one time.
Can someone tell me which is the best parser out there and give me a sample program the reads an xml file?
Thanks,
Arthur
I have to parse an xml file to get the various files.
This will be a stand alone java program that parses an xml file, reads the values and
create a flat file based on the data. I will be parsing about 2000 32kb xml files at one time.
Can someone tell me which is the best parser out there and give me a sample program the reads an xml file?
Thanks,
Arthur
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
as kiran hk said
SAX is the right parser for your scenario.
i suggest you one of the best java parsers accepted by the world. The source it self has many examples. you can download it from
http://xml.apache.org/xerces-j/
somasekhar
SAX is the right parser for your scenario.
i suggest you one of the best java parsers accepted by the world. The source it self has many examples. you can download it from
http://xml.apache.org/xerces-j/
somasekhar
Look at
- xml.apache.org/xmlbeans/
- xstream.codehaus.org/
- xml.apache.org/xmlbeans/
- xstream.codehaus.org/
DocumentBuilderFactory dbf = DocumentBuilderFactory.new
DocumentBuilder db = dbf.newDocumentBuilder();
InputStream in = new FileInputStream(filename);
Document doc = db.parse(in);
in.close();