Frictional Games Forum (read-only)
Tool: XML Validator - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Resources (https://www.frictionalgames.com/forum/forum-42.html)
+---- Thread: Tool: XML Validator (/thread-4765.html)



Tool: XML Validator - MulleDK19 - 09-26-2010

A very simple tool for validating XML files.
It can validate a single XML file, or an entire folder.

I made this tool since HPL doesn't give you much information on what's wrong with your XML files.

And I thought that I might as well release it, so other people having trouble finding errors in their XML files could get a hand.


Requirements
Microsoft Windows
Microsoft .NET Framework 2.0

It will treat the following files as XML files:
  • .xml
  • .cfg
  • .lang
  • .map
  • .snt
  • .flash
  • .comment
  • .mat
  • .ent
  • .ho



Example output 1

Invalid custom_story_settings.cfg

HPL2 will print the following to the hpl.log file:
Quote:Error creating custom story from path "custom_stories/MortenASA" : could not find custom_story_settings.cfg file or it was invalid.

My tool will display the following message:
Quote:custom_story_settings.cfg: Data at the root level is invalid. Line 14, position 1.



Example output 2

Invalid extra_english.lang

HPL2 will print the following to the hpl.log file:
Quote:ERROR: Couldn't load language file 'custom_stories/MortenASA/extra_english.lang'

My tool will display the following message:
Quote:extra_english.lang: The 'LOL' start tag on line 20 does not match the end tag of 'lol'. Line 20, position 8.




Download
You can download the tool here: http://www.amnesia.treesoft.dk/downloads/XMLValidator.zip


RE: Tool: XML Validator - Frontcannon - 09-26-2010

111 internets? Too bad, that's too cool so I don't give you one Tongue

You'd definitely deserve it, but I think you know that already Big Grin


RE: Tool: XML Validator - MulleDK19 - 10-05-2010

(09-26-2010, 11:38 PM)Frontcannon Wrote: 111 internets? Too bad, that's too cool so I don't give you one Tongue

You'd definitely deserve it, but I think you know that already Big Grin

You could give it now then xD

Thanks anyway Tongue


RE: Tool: XML Validator - waqas12346 - 11-24-2010

What does this software do? Huh


RE: Tool: XML Validator - Frontcannon - 11-24-2010

It validates XML files?


RE: Tool: XML Validator - house - 11-24-2010

(11-24-2010, 06:22 PM)waqas12346 Wrote: What does this software do? Huh

:O Didn't you read the description!?


RE: Tool: XML Validator - PvtLastClass - 11-26-2010

Seems very useful!
One other way someone could try validating is with an XML-centered text editor, like Notepad++. If it looks at an XML file and you select a node, it will show you where it associates that node's ending (via highlighting). I think the syntax highlighting also messes up when the XML is not well-formed.