tags:

views:

32

answers:

1

I asked similar question about HTML, but I want to know if emacs XML mode has the feature.

  • Is there 'M-x browse-url-of-file' equivalent in XML mode? I mean, is there any key that can pop up xml editor (XMLEditor or similar)?
  • Is there any XML editing tool to enable the reverse link back to emacs XML mode?

ADDED

Based on slomojo's comment, I think if emacs' nXML mode can do whatever my XML editor (XMLEditor with Mac, XML Editor with PC) can do, I don't need this forward/reverse link.

These are what I found useful with XMLEditor.

  • collapsable node : I can collapse a whole/part of a tree if necessary.
  • Grammar checker : If the XML has DTD, XML Editor checks if XML tree follows the DTD.
  • Easy search and replace

There might be more, but those are what I need mostly.

+1  A: 
  1. nxml-mode has built in support for hiding, but by default it is set up for DocBook, you need to customize it for anything else. You can also customize outline-mode to recognize XML tags, or use hs-minor-mode to hide and show different levels of tags. The latter two can also be used with xml-mode. See here for details on how to set it up (the instructions are for XHTML, but can be adapted for any XML dialect.

  2. nxml-mode can check against RelaxNG schemas, so you need to convert your DTDs first. Use trang to convert, and see the nxml manual if you want to set things up so that your files get automatically associated with this schema. Without a schema, it will warn you if the file is not valid XML which is useful in itself.

  3. M-% is not easy?

JSON