How to validate very large XML files?

前端 未结 11 2467
失恋的感觉
失恋的感觉 2020-12-16 15:44

How can I validate a large XML file (>100mb)? I try to open it with IE, FX & GC and it either crashes or doesn\'t do anything.

相关标签:
11条回答
  • 2020-12-16 16:31

    On Windows you can write a simple application based on .net platform. The System.Xml.XmlReader class is capable of validating huge files. An example is in this answer: Validating an XML against referenced XSD in C#

    0 讨论(0)
  • 2020-12-16 16:32

    The only tool I know that combines a large file viewer and an XML validator for huge files is XML ValidatorBuddy . The file viewer doesn't load the complete file at once but it is possible to scroll and there is also XML syntax-coloring applied. The validation uses the SAX parser from Xerces and your document with >100mb shouldn't be a problem.

    0 讨论(0)
  • 2020-12-16 16:32

    You can also use the XML Tools Plugin in Nodepad++, it has a function "Check XML Syntax now". It's simple to download and if you don't use Notepad++ already, it's a good reason to start!

    0 讨论(0)
  • 2020-12-16 16:36

    You can try using a command-line validator, for example xmlstarlet:

    $ xmlstarlet validate bigfile.xml
    
    0 讨论(0)
  • 2020-12-16 16:39

    Oxygen XML has a HUGE FILE support that does validation

    http://www.oxygenxml.com/#14.1Huge_XML_Files_Support

    0 讨论(0)
提交回复
热议问题