3

Are there any useful functions / modes / hydras / utilities for navigating xml documents?

Some features that might be nice to have:

  • Jump to parent
  • Jump to next child
  • Jump to matching tag (like % in vim)
  • Helm go to ancestor
  • Helm to to child

Things that I have found so far

Commands sgml-skip-tag-forward and sgml-skip-tag-backward. There is an sgml-tag-end function by this is not interactive and wants to take an argument.

Att Righ
  • 725
  • 4
  • 14
  • [x-path-walker](https://melpa.org/#/x-path-walker) is looking quite nice for globally navigating around (it would be nice to do this relative to a node) – Att Righ Nov 03 '17 at 23:34

1 Answers1

2
  1. See nxml-mode, option nxml-sexp-element-flag, and movement commands such as nxml-forward-balanced-item, nxml-forward-element, and nxml-up-element.

  2. If you use library Icicles then you can use Icicles search commands icicle-search-xml-element and icicle-search-xml-element-text-node for navigating among and within XML elements.

    (Non-nil option icicle-ignore-comments-flag means ignore comments for such Icicles search commands, so that XML elements that are commented out are skipped. You can toggle this during search using C-M-;.)

Drew
  • 75,699
  • 9
  • 109
  • 225