Arash
Arash

Reputation: 568

How to print Double-Quotes in Elisp

I can't seem to be able to insert the xml declaration in my code.

(insert "<?xml version="1.0" encoding="UTF-8" standalone="no" ?>")

It's an easy question but I can't figure it out!

Upvotes: 1

Views: 563

Answers (2)

Daniel
Daniel

Reputation: 641

 (insert "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>")

This should work

Upvotes: 2

Haile
Haile

Reputation: 3180

http://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-for-Strings.html

To include a double-quote in a string, precede it with a backslash; thus, "\"" is a string containing just a single double-quote character.

Upvotes: 1

Related Questions