This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Query on xml parsing using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Query on xml parsing using java" Watch "Query on xml parsing using java" New topic
Author

Query on xml parsing using java

akshitha Akki
Greenhorn

Joined: Aug 03, 2012
Posts: 24
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

Joined: Jul 27, 2010
Posts: 1157

Study the classes in javax.xml.parsers package. That should do it for you.


~ Mansukh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41036
    
  43
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


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Query on xml parsing using java
 
Similar Threads
path resolution problem for DTD file on Linux
Xerces, Oracle or Sun TR2
Parsing an XML File through JSP
XML validation checks on String
Exception object catching multiple exceptions in one time?