<p>Most XML parsers will give up after the first error in a document.  In fact, IIRC, that's actually part of the 'official' spec for parsers.  </p>

<p>I'm looking for something that will break that rule.  It should take a given schema (assuming a valid schema) and an xml input and attempt to keep going after the first error and either raise an event for each error or return a list when finished, so I can use it to generate some kind of a report of the errors in the document.  This requirement comes from above, so let's try to keep the purist <em>"but it wouldn't make sense to keep going"</em> comments to a minimum.  </p>

<p>I'm looking for something that will evaluate both whether the document is well-formed <em>and</em> whether or not it conforms to the schema.  Ideally it would evaluate those as different classes of error.  I'd prefer a .Net solution but I could use a standalone .exe as well.  If you know of one that uses a different platform go ahead and post it because someone else might find it useful.</p>

<p><strong>Update:</strong> </p>

<p>I expect that most of the documents where I use this will be <em>mostly</em> well-formed.  Maybe an &amp; included as data instead of &amp;amp here and there, or an occasional mis-placed tag.  I don't expect the parser to be able to recover from anything, just to make a best-effort to keep going.  If a document is too out of whack it should spit out as much as it can followed by some kind of 'fatal, unable to continue' error.  Otherwise the schema validation part is pretty easy.</p>

[{'answer_id': 32511, 'author': 'Duncan Smart', 'author_id': 1278, 'author_profile': 'https://Stackoverflow.com/users/1278', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/" rel="nofollow noreferrer">DevExpress CodeRush</a> does this when you press TAB when the cursor is in an identifier, you can then tab through all the highlighted instances. There\'s also a DXCore plugin (the foundation upon which CodeRush/Refactor Pro are built) that does current-line highlighting.</p>\n'}, {'answer_id': 32769, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>The "error bar" functionality is provided in JetBrains ReSharper. I\'m not sure if it does highlighting of references to the currently selected identifier.</p>\n'}, {'answer_id': 42043, 'author': 'Darren Steinweg', 'author_id': 418, 'author_profile': 'https://Stackoverflow.com/users/418', 'pm_score': 5, 'selected': True, 'text': '<p>In a different question on SO (<a href="https://stackoverflow.com/questions/41908/customizing-visual-studio">link</a>), someone mentioned the VS 2005 / VS 2008 add-in "RockScroll".  It seems to provide the "error bar" feature I was inquiring about in my question above.</p>\n\n<p><a href="http://www.hanselman.com/blog/IntroducingRockScroll.aspx" rel="nofollow noreferrer">RockScroll</a></p>\n\n<p>EDIT:  RockScroll also does the identical token highlighting that I was looking for!  Great!</p>\n'}, {'answer_id': 42088, 'author': 'Steve Gury', 'author_id': 1578, 'author_profile': 'https://Stackoverflow.com/users/1578', 'pm_score': 2, 'selected': False, 'text': '<p>The automatic highlight is implemented in <a href="http://www.wholetomato.com/" rel="nofollow noreferrer">Visual Assist</a> as the refactoring command "Find References". It highlights all occurences of a given variable or method, but that\'s not automatic (binded to a keyboard shortcut on my computer).</p>\n\n<p>Here is an exmaple:</p>\n\n<p><img src="https://i.stack.imgur.com/a9u55.jpg" alt="alt text"></p>\n'}, {'answer_id': 1044011, 'author': 'Micha', 'author_id': 128799, 'author_profile': 'https://Stackoverflow.com/users/128799', 'pm_score': 2, 'selected': False, 'text': '<p>About RockScroll: It doesn\'t highlight the identifiers. It only highlights the same string in the source code! If there are similar identifier declared : ex. _test and test, and test is highlighted it will highlight the string "test" in variable _test too! And it will also highlight the same string in a method called "sometesting()". So it isn\'t exactly like eclipse and doesn\'t work for me. </p>\n'}, {'answer_id': 1206496, 'author': 'Codeguard', 'author_id': 147805, 'author_profile': 'https://Stackoverflow.com/users/147805', 'pm_score': 3, 'selected': False, 'text': '<p>The highlight functionality is conveniently implemented in <a href="http://www.wholetomato.com" rel="noreferrer">VisualAssist</a>.\nIn my opinion, they are both must-have.</p>\n\n<p>1) Highlight identifier under editing caret:\nOptions -> Advanced -> Refactoring -> Automatically highlight references to symbol under cursor</p>\n\n<p>2) Highlight search result - in all windows. Works for RegExps! \nOptions -> Advanced -> Display -> Highlight find results</p>\n'}, {'answer_id': 2676584, 'author': 'Roman Starkov', 'author_id': 33080, 'author_profile': 'https://Stackoverflow.com/users/33080', 'pm_score': 3, 'selected': False, 'text': '<p>Old question but... Visual Studio 2010 has this feature built-in, at last.</p>\n'}, {'answer_id': 3231212, 'author': 'Alex_P', 'author_id': 52401, 'author_profile': 'https://Stackoverflow.com/users/52401', 'pm_score': 5, 'selected': False, 'text': '<p>There is a RockScroll alternative called <a href="http://code.google.com/p/metalscroll/" rel="noreferrer">MetalScroll</a> which is essentially the same thing with a few tweaks and improvements.</p>\n\n<p>Also there is a small and simple <a href="http://code.google.com/p/wordlight/" rel="noreferrer">WordLight</a> plug-in that only highlights the identical  tokens.</p>\n\n<p>Both are open source and support code folding which is nice.</p>\n\n<p>Imho, the bar next to the scroll bar in Eclipse is a lot more elegant solution than the scroll bar replacement of RockScroll/MetalScroll. Unfortunately I couldn\'t find any VS plug-ins that do it the Eclipse way, so I just stick with WordLight. </p>\n'}, {'answer_id': 5102189, 'author': 'meetjaydeep', 'author_id': 348971, 'author_profile': 'https://Stackoverflow.com/users/348971', 'pm_score': 4, 'selected': False, 'text': '<p>Check following addins\n<a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/" rel="noreferrer">Productivity Power Tools</a>- Displays error in scrollbar and </p>\n\n<p><a href="http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb/" rel="noreferrer">Highlight selected word</a></p>\n'}, {'answer_id': 12525655, 'author': 'wip', 'author_id': 758666, 'author_profile': 'https://Stackoverflow.com/users/758666', 'pm_score': 1, 'selected': False, 'text': '<p>For selected word(s) highlight function only, there is also <a href="http://visualstudiogallery.msdn.microsoft.com/8ffec54d-4e18-4c42-ad33-2ea6f28de464" rel="nofollow">StickyHighlight</a>.</p>\n\n<p>StickyHighlight supports Visual Studio 2010 &amp; 2012.</p>\n'}, {'answer_id': 47015054, 'author': 'Jan_V', 'author_id': 352640, 'author_profile': 'https://Stackoverflow.com/users/352640', 'pm_score': 2, 'selected': False, 'text': '<p>In VS 2017, this can be solved by installing the <a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MatchMargin" rel="nofollow noreferrer">Match Margin</a> plugin.</p>\n\n<p>It appears to be part of the <a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerPack2017" rel="nofollow noreferrer">Productivity Power Tools</a> (which might be worth looking at for other features), but surprisingly, installing PPT didn\'t solve the problem for me, I had to install Match Margin separately.</p>\n'}]
['https://Stackoverflow.com/questions/32505', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3043/']