views:

177

answers:

2

Hi all,

As XML Schemas can be tedious to read (yes, just want to read through the schema) in their normal form, I'm wondering if anyone knows of an existing plugin for vim which will display the schema in tree form, as several XML editors do? Selection of a node in this tree to navigate to the relevant section of the schema would be a good plus, but not absolutely necessary.

Thanks for your help!

+5  A: 

I realize that you're looking for something different, but check out xml.vim. From the information available on the vimscripts website, it says it's capable of:

  • closing tags while you type
  • optional adding attributes
  • % matches end or begin tag
  • folding tags, comments and Cdata
  • adding start tag, end tags
  • adding tags around a visual block or a tag,
  • joining 2 adjacent same tags
  • deletings tag or tag sections
  • changing a tag

After you having it installed (by placing it in .vim/ftplugin, type :help xml-plugin for more information. You might be able to add a autocmd and fold all tags on buffer entry. That way you can traverse the xml file just as you would with a normal xml editor.

Dan Loewenherz
I am indeed familiar with this. I like your folding idea. I was looking for something similar to NERDtree, but with the XML elements in a file instead of files and folders.Thanks again!
stephenhay
Yeah, I'm not sure if anything like that exists, unfortunately. You could always write one, though! =)
Dan Loewenherz
A: 

Maybe xmledit and XML folding can improve your experience.

Gregory Pakosz