bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17964: 24.3; xml-print inserts spurious whitespace


From: Juliusz Chroboczek
Subject: bug#17964: 24.3; xml-print inserts spurious whitespace
Date: Mon, 07 Jul 2014 14:54:30 +0200
User-agent: Wanderlust/2.15.9

Hi.

I'm trying to use Emacs' XML parser to parse Atom feeds, and I'm finding
that xml-print inserts spurious whitespace in the XHTML content, which
breaks formatting.  Here's a pretty minimal example:

(require 'xml)

(defun xml-parse-from-string (s)
  (with-temp-buffer
    (insert s)
    (xml-parse-region (point-min) (point-max))))

(defun xml-print-to-string (x)
  (with-temp-buffer
    (xml-print x)
    (buffer-substring (point-min) (point-max))))

(xml-print-to-string (xml-parse-from-string "<p>[<a>foo</a>]</p>"))
"<p>[
  <a>foo</a>]
</p>"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]