emacs-devel
[Top][All Lists]
Advanced

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

Re: Drop toplevel XML-comments in libxml-parse-(xml|html)-region?


From: Lars Magne Ingebrigtsen
Subject: Re: Drop toplevel XML-comments in libxml-parse-(xml|html)-region?
Date: Tue, 11 Nov 2014 22:52:33 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> writes:

> But the only problematic comment is the top-level one, because that
> makes the structure different than if the comment wasn't there.  Perhaps
> we could just cheat and push any top-level comments one step down in the
> DOM?  I mean, it's gross, but I don't think anybody would actually
> notice in real life.

It would mean that

<?xml version="1.0" encoding="UTF-8"?>
  <foo>bar</foo>
<!--ignore me-->

would turn into

<?xml version="1.0" encoding="UTF-8"?>
  <foo>bar</foo>
  <!--ignore me-->

where indentation represents where in the DOM the element appears.  Sort
of.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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