Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nxml]

The tag has no usage guidance.

2
votes
0answers
126 views

How to see preview of svg file I'm editing?

I'm editing a svg file and want to see how it looks like. I tried opening a window with the same buffer and change to image-mode but it change the mode in both windows. I tried opening the same file ...
2
votes
0answers
62 views

Editing subtitles or closed caption files?

I'm having trouble locating any Emacs modes supporting YouTube caption/subtitles files. This YouTube help page details the list of file formats for subtitles and captioning supported by YouTube: ...
2
votes
1answer
106 views

Prevent hooks from parent mode in derived mode

I have: (add-hook 'text-mode-hook 'turn-on-auto-fill) but in lisp/nxml/nxml-mode.el: (define-derived-mode nxml-mode text-mode "nXML" All XML files is opened with auto-fill-mode. That is ...
3
votes
0answers
296 views

How to disable schema validation in nxml-mode but keep validation of well-formedness?

By default, nxml-mode looks at the name of the root element and decides to validate the document against some schema based on that name. I would like to disable this and just validate that the ...
3
votes
1answer
78 views

Is nxml-mode vulnerable to the billion laughs attack?

I was asked this by a friend, and I couldn't find any information about whether this vulnerability exists in nxml-mode as current or not. I specifically mean this billion laughs attack.
0
votes
1answer
96 views

Indent Continuation Lines in nxml-mode

A style guide for DocBook XML that I must adhere to states "Content within elements should be indented by two spaces if the content runs over more than one line." They give this example. <para>...
7
votes
1answer
2k views

How to set indent to 4 spaces in nxml-mode?

I wanted to indent my XML files with 4 spaces. I tried to google it, and found this and this one. But they seem pretty old and/or didn't help me. This post is great about how to pretty print XML ...
4
votes
2answers
540 views

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: <a> <b>...</b> </a> Let's say the cursor is at the <a>. I'm ...
2
votes
0answers
87 views

Navigating in an nXML buffer

I'm editing an XML with nXML-mode. The file represents a document and has internal links of the form: Follow <linktag docref="foo">this link</linktag> to see <anchortag docref="foo">...
3
votes
0answers
239 views

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 ...
4
votes
1answer
741 views

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. ...
0
votes
1answer
43 views

Set schema automatically after auto-insert

I have auto-insert-mode configured to insert a basic XML file in nxml-mode, but nxml-mode is then still configured to use an empty schema, as if the file was still empty. How can I automatically make ...
1
vote
1answer
37 views

Insert another XML element of the same type

In nxml-mode, I would like to insert an XML tag that has the same name as the nearest closing tag before point, without having to retype (or complete) the same tag name each time I do it.
0
votes
1answer
55 views

What should I do to get xi:include to be recognised and my specified dtd file used?

Pretty simple xml file with: <?xml version="1.0"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "../../../../tools/docbook-dtd-4.4b2/docbookx.dtd" [ <!...
0
votes
1answer
79 views

Keybinding/Function to Close Xml Tag

In LaTeX-mode, there is latex-close-block, bound to C-c C-e. Is there a function to programmatically close an XML tag in nXML-mode?
14
votes
4answers
9k views

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?
0
votes
1answer
142 views

Using font-lock with custom faces in nXML mode

I am trying to view XML files in Emacs, but I am not seeing any font highlighting. The entire document appears as white on black (which is my default font). The following note appears on the ...
-1
votes
1answer
73 views

How to specify the mode-name displayed in the buffer pop-up list?

I'm working on a couple of XML-format major modes, both of which are derived modes based on nXML, and I cannot get Emacs to display the mode names -- either in the minibuffer or in the buffer-list pop-...
0
votes
1answer
440 views

how to fold xml file (or specifically build.xml) [duplicate]

I am using spacemacs nXML mode to edit build.xml (java ant configuration file), the file is very long, how to fold and unfold it?
40
votes
2answers
6k views

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) ...