[Top][All Lists]

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

Re: xml-parse-file and text properties

From: Thien-Thi Nguyen
Subject: Re: xml-parse-file and text properties
Date: 21 Jul 2006 16:52:37 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

JD Smith <address@hidden> writes:

> I'm parsing a very large XML file
> [...]
> never loaded into an active buffer

do you use `xml-parse-file' w/ a FILE that refers to a file not
currently visited (in a buffer)?  looks like `xml-parse-file' uses
`find-file' to handle that case.  maybe something like the following
would give better results?


*** xml.el      6 Feb 2006 14:33:36 -0000       1.53
--- xml.el      21 Jul 2006 20:46:44 -0000
*** 170,177 ****
          (set-buffer (get-file-buffer file))
          (setq keep (point)))
!       (let (auto-mode-alist)          ; no need for xml-mode
!       (find-file file)))
      (let ((xml (xml-parse-region (point-min)
--- 170,177 ----
          (set-buffer (get-file-buffer file))
          (setq keep (point)))
!       (set-buffer (generate-new-buffer " *xml work*"))
!       (insert-file-contents file))
      (let ((xml (xml-parse-region (point-min)

reply via email to

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