How To check validity of XML File

can any one tell me how to find whether an XML file is valid or not before beginning to parse the XML file Thanks in advance
[151 byte] By [paapu] at [2007-9-26 6:29:16]
# 1
I f you are using a parser such as Xerces or JAXP it will not let you load in the XML if it is not valid.
dubwai at 2007-7-1 15:36:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
simplest way to check if the format is correct, just drag and drop that xml file into IE... simple and fast, down and dirty...
yue42 at 2007-7-1 15:36:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
The answer is no. You cannot check the validity of an XML file before actually parsing it.
lk555 at 2007-7-1 15:36:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Xerces will do that for qou, if you activate validation (and, of course, a DTD is specified in the file). Read the documentation of Xerces at xml.apache.org
RiGe at 2007-7-1 15:36:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
You cannot check the validity of an XML file before actually parsing it.
vvelus at 2007-7-1 15:36:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...