in reply to Re: Quick check for XML DTD or Schema
in thread Quick check for XML DTD or Schema

Makes sense. Assuming the declaration is at the top, is it sufficient in the case of a DTD, to check for "<!DOCTYPE root-element'? Or for a schema, to check that the path of the XML schema is in the schemaLocation attribute of the XML file root element, i.e. check for 'xsi:schemaLocation' or 'xsi:noschemalocation'?
  • Comment on Re^2: Quick check for XML DTD or Schema

Replies are listed 'Best First'.
Re^3: Quick check for XML DTD or Schema
by boftx (Deacon) on Nov 06, 2014 at 16:58 UTC

    I would think so. Try it. :)

    Using one of the modules named below would work, too, but I got the sense from the OP that you don't want to do that, just a real quick peek at the file without the overhead of doing any work with it.

    You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.