Login or sign up Lost password?
Login or sign up
I used to validate this with php and I have to check every nodes. it is my xml example: You need to provide us: an example of correct XML (i presume the one you posted is valid), your DTD, an example (or more) of WRONG XML and the associated "best response". If you want to check only if the document is well formed (you don't care about the DTD validity, and don't even have a DTD to validate against) use Domdocument to validate your file, rather than XMLReader, because XMLReader will stream you document and don't load it at once, so is Valid() method will only check the first node.