GNU bug report logs - #17964
24.3; xml-print inserts spurious whitespace

Previous Next

Package: emacs;

Reported by: Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>

Date: Mon, 7 Jul 2014 12:56:01 UTC

Severity: normal

Tags: confirmed, wontfix

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>
To: 17964 <at> debbugs.gnu.org
Subject: bug#17964: 24.3; xml-print inserts spurious whitespace
Date: Mon, 07 Jul 2014 14:54:30 +0200
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>"




This bug report was last modified 9 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.