Questions tagged [xml]

26 questions
46
votes
4 answers

The old "how to fold XML" question

I'm doing quite a bit of manual XML editing (the source definition of some code generation I'm doing is a custom XML format) and of course prefer to use Emacs over any special purpose (usually ugly) XML editors. nXml mode has stood me well in the…
Mark
  • 1,409
  • 1
  • 15
  • 20
33
votes
6 answers

How to prettify/format an XML buffer?

I have a file with xml all on one line. Does the functionality already exist to reformat this buffer to be somewhat user-readable?
wdkrnls
  • 3,657
  • 2
  • 27
  • 46
10
votes
2 answers

Open SVG files in XML mode

When opening a vector icon text file for editing, Emacs first tries to display it as an image. That is wrong ; If the file has errors, Emacs (25.3.2 - x86_64-pc-linux-gnu, GTK+ Version 3.18.9) crashes miserably. Well, I know it has errors, that why…
yPhil
  • 963
  • 5
  • 22
6
votes
2 answers

How do I use Emacs as a feedly.com client?

Q: How do I use feedly.com as an RSS feed source in Emacs 24.4? I've searched sporadically for months. I haven't found anything to even point me in the right direction to get started. I've opened a ticket with Feedly as well. Context While not…
prjorgensen
  • 533
  • 3
  • 12
5
votes
2 answers

One key shortcut to jump two-ways between matching opening/closing tags in nxml mode?

Context Editing an arbitrary XML file in nxml-mode. Need Let's say I have a structure like this: ... Let's say the cursor is at the . I'm looking for one shortcut that brings the cursor directly from to , and back if…
5
votes
1 answer

How do I edit an XML file in Emacs with tag autocompletion from a known XSD schema?

I'd like to use Emacs for XML editing. A long, long time ago I recall using pSGML to do that. Now that I've returned to Emacs I'd like to have tag autocompletion and easy navigation in XML files. Unfortunately, pSGML has fallen into disrepair and I…
Deer Hunter
  • 161
  • 6
3
votes
1 answer

Insert json or XML blocks in org mode

I often have to insert blocks of json or XML code into my org documents. What is the preferred way of doing so? I see that for the standard: #+BEGIN_SRC ... #+END_SRC ... there is no json or xml in the list of supported languages:…
Ricky Robinson
  • 267
  • 2
  • 10
3
votes
0 answers

how can i configure sgml-mode to format open and close tags on same line?

I set up my emacs to use sgml-mode so that I can format xml with M-x reformat-xml, but it puts the closing tags on the line below, rather than on the same line. instead of this: stuff I want this: stuff Can I…
Adam
  • 241
  • 2
  • 7
3
votes
1 answer

Moving around within xml documents?

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…
Att Righ
  • 725
  • 4
  • 14
3
votes
1 answer

How to show XPath for current location in an XML hierarchy in the modeline?

When editing a long Maven pom.xml I may see a screen full of blocks with their parent tags out of sight. I would like to know whether I'm looking at a /project/build/plugins/plugin tag or a /project/profiles/profile/build/plugins/plugin…
Zoltan
  • 231
  • 1
  • 7
3
votes
0 answers

How to validate nested xml namespaces with associated schemata in nxml?

I often use emacs to edit oozie workflow/coordinator definitions and nxml mode is pretty handy for that. I never bothered much to get more than basic xml validation since schema-based validation seemed too complex to set up for me. But it turns out…
David Ongaro
  • 370
  • 4
  • 13
2
votes
1 answer

Multiple modes for one file

I want to be able to use emacs to view log files. There are chunks in the log files that are nicely formatted text, and chunks that are formatted in XML. Is there a way of getting emacs to format and colour the XML sections as if it were in XML mode…
David Boshton
  • 253
  • 2
  • 11
2
votes
0 answers

Collapse xml-node-children from `xml.el` into a string

An API I have used for years (via an elisp package) recently started inserting formatting tags (particularly for italics) into the 'ArticleTitle' field of entries. The assumption that the node-child of 'ArticleTitle' field is a single…
2
votes
3 answers

How pretty format XML in Windows?

Windows 10, Emacs 25.1 Is it possible to pretty format XML file? E.g. here not formatted xml:
a_subscriber
  • 3,854
  • 1
  • 17
  • 47
2
votes
1 answer

Adding XUL file syntax highlighting support?

I am new on Emacs and I am working on modifying firefox interface. XUL is implemented as an XML dialect. I just need basic syntax highlighting for XUL. I found that VIM and gedit are working out of box. If I change the file extension to .xml, it…
ZIYIM
  • 41
  • 3
1
2