From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: How to visualize HTML/XML files in Emacs? Date: Thu, 08 Jan 2015 04:03:32 +0100 Message-ID: <87ppaqx9bv.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420686271 26481 80.91.229.3 (8 Jan 2015 03:04:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2015 03:04:31 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 08 04:04:27 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y93OG-00042K-4B for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2015 04:04:04 +0100 Original-Received: from localhost ([::1]:43817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y93OA-0002CO-Ef for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Jan 2015 22:03:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y93Nz-00028I-8K for help-gnu-emacs@gnu.org; Wed, 07 Jan 2015 22:03:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y93Nw-0006Pb-0i for help-gnu-emacs@gnu.org; Wed, 07 Jan 2015 22:03:47 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:48771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y93Nv-0006PN-QE for help-gnu-emacs@gnu.org; Wed, 07 Jan 2015 22:03:43 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 307CF46987 for ; Thu, 8 Jan 2015 04:03:42 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xrr-TNwsy94P for ; Thu, 8 Jan 2015 04:03:42 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 0182446963 for ; Thu, 8 Jan 2015 04:03:41 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101942 Archived-At: Hello there, so I have this HTML (or XML) file, and it is a mess as far as indenting and newline characters go. I'd like to either pretty-print it, or maybe convert to s-expressions, or visualize it in any other way. What would you recommend? I know (from this answer on ESE: http://stackoverflow.com/a/6247579) about sgml-pretty-print, and it works nice. Any other suggestions? Bonus points if it could be done with skewer-mode (or something), so that the HTML is taken from the browser. (Notice that even if I'm browsing a local file, which I am, just grabbing the file won't help, since I modify the DOM in the browser with JavaScript.) TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University