Minor mode providing XPath querying and XML formatting via the xmlstarlet command line utility.
Adds the following keybindings
Keybinding | Feature | With C-u prefix argument |
---|---|---|
C-c C-c | Runs XPath query and displays results in the *XPath-Result* buffer |
Displays results in text mode instead of nxml mod |
C-c f | Formats XML and displays in the *xml-format* buffer |
Replaces current buffer contents |
-
Install XMLStarlet and make it available from on the
PATH
-
Clone the repo to
site-lisp
directory -
Add to
load-path
(add-to-list 'load-path (expand-file-name "site-lisp/xmlstarlet-mode" user-emacs-directory))
-
Load & configure
(require 'xmlstarlet-mode) (setq xmlstarlet-command "xmlstarlet")