XmlDocViewer
Jeff Key
September 10, 2004
Updated: October 10, 2004
Charitable Donations

I wrote this years ago to make copying XPaths from an instance XML document easier. I've added to it over the years as I grew tired of using Internet Explorer as an XML viewer. Considering that, it isn't perfect.

(The XML pane is the most excellent ActiPro Syntax Editor. The toolbar is the also excellent Skybound Rebar. Thanks, folks!)

Features/Help

Populating:

  • Drag/drop XML file from Windows Explorer onto the tree area.
  • Drag/drop XML text onto the tree area.
  • Drag/drop XML file from Windows Explorer onto the application icon or shortcut.
  • Paste XML from clipboard (use Paste Special to paste text with escaped quotes, like those in Visual Studio's Immediate window).

Searching:

  • Find optionally searches element names, leaf element names, attribute names and attribute values.
  • Find nodes matching an XPath query. Double-click results to go to node.

Miscellaneous:

  • The XML viewing pane (bottom) shows the text of the element if it's a leaf or the outer XML if it isn't.
  • The pane on the right shows the names and values of the attributes for the currently selected element.
  • Copies the full path to an element, the element name, or /element name.

Notes:

  • Large documents may load slowly if the XML viewing pane is visible. If you're going to load a large document, hide the bottom pane, load the doc, then show the XML pane once you've navigated to a smaller node.
  • CTRL+C is bound to the tree view. Use the context menu on the XML pane to copy XML.
  • My primary motivation for releasing this is that the green ladybug is one of my favorite icons and I couldn't keep it to myself any longer. Unfortunately, I found it when I first wrote the app and didn't note who made it. If you know, please drop me a line.

Changes in V1.1

  • Added Find by XPath

Download

Sorry, source isn't available for a few reasons:

  1. There's absolutely nothing interesting in the code.
  2. You wouldn't be able to compile it since I'm using licensed controls.
  3. Like most everything else on here, the source isn't pretty due to the random tweaking over the years.