| Author |
XML Parser
|
Jithesh Kozhipurath
Ranch Hand
Joined: Aug 27, 2003
Posts: 76
|
|
Hai all, Is there any need for separate XMLparser for jdk1.4.If it is available how to use the XML parser. How to set the class path and what are the methods to parse the XML document. What parser can we use(SAX, DOM etc.). My requirement is to send a XML request & retrive a XML response and parse it. Thanks in advance. Jithesh
|
Jithesh K
|
 |
Manish Hatwalne
Ranch Hand
Joined: Sep 22, 2001
Posts: 2573
|
|
If you are using JDK 1.4, you do not need a separate parser, since JDK has in-built support for XML, and if I recall correctly, it uses crimson parser. HTH, - Manish
|
 |
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
|
|
My requirement is to send a XML request & retrive a XML response and parse it. Just as an aside, you should understand that you may not even need an XML parser for this. Sure the document(s) are XML, but if all you need to do is extract a build a standard request with a small number of variable fields, and extract a small number of element values from a response, you might as well use Java's built-in string handling. For example, something like: I only suggest this because a full-fat XML parser is a heavyweight thing, and the code to use it will probably be much bigger and more complex than what I have given above. If you really do need an XML parser, I apologize for the interruption.
|
A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
|
 |
HS Thomas
Ranch Hand
Joined: May 15, 2002
Posts: 3404
|
|
Hi Frank and Manish, Is there any central place for information on when to use Java and when , XML ? It may also make learning of the two easier. Is JDK 1.4 the best place for this ? regards [ September 01, 2003: Message edited by: HS Thomas ]
|
 |
Manish Hatwalne
Ranch Hand
Joined: Sep 22, 2001
Posts: 2573
|
|
Originally posted by Frank Carver: My requirement is to send a XML request & retrive a XML response and parse it. I only suggest this because a full-fat XML parser is a heavyweight thing, and the code to use it will probably be much bigger and more complex than what I have given above. If you really do need an XML parser, I apologize for the interruption.
I wholeheartedly agree with Frank, make sure that your requirements justify use of XML. Quite often I have seen developers opting for XML parsers when even simple StringTokenizer would suffice. - Manish
|
 |
Jithesh Kozhipurath
Ranch Hand
Joined: Aug 27, 2003
Posts: 76
|
|
Thank you friends, I am looking at a software that will be compatible with all the programming languages so I am in need of XML. Now i want to work it with java, and may be i will change it to some other. And the data is retrived from a remote database, so I must use XML for the data transfer.
|
 |
 |
|
|
subject: XML Parser
|
|
|