• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query on xml parsing using java

 
akshitha Akki
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one tell me if there is way parse/validate xml contents with the java code?
for example one of the validation can be to check if all the tags are closed in the xml given for validation..
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Study the classes in javax.xml.parsers package. That should do it for you.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that there is a difference btween testing for well-formedness (which is what closing and properly matching tags is all about) and validation (which requires a schema of some kind to test the XML against). Start reading here: https://www.coderanch.com/how-to/java/XmlFaq
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic