Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

easy XML parser

 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys ,

I'm new to dealing with XML with java , So please b i wanna know the best and easiest XML parser to read and write xml with java ...
Appreciate your advice ..
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Best" and "easiest" are always relative to the problem at hand, so we can't give general advice on that. The XmlFaq points to several introductions on how to use JAXP, the standard Java API for processing XML. You may also wish to investigate 3rd party APIs like XOM and JDOM.
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually what i wanna do is that i got XML file i wanna to read it and edit some element then save it ... that's all i wanna do
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... which is precisely what JAXP and the other libraries I mentioned do. :-)
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:... which is precisely what JAXP and the other libraries I mentioned do. :-)


Thanks Ulf for your fast reply, by the way the XML file i wanna edit is web.xml file in my WAR , so JAXP will help or any 3rd party will be better ?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Better" in what regard? JAXP -like the other XML parsers and DOM implementations- doesn't care about what kind of XML file it's dealing with.
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got your idea , OK i'll use JAXP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic