[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xml-parse-file and text properties
From: |
Richard Stallman |
Subject: |
Re: xml-parse-file and text properties |
Date: |
Thu, 20 Jul 2006 17:46:31 -0400 |
By the way, it looks like the function xml-parse-file
would be much cleaner if written like this. Does this work?
(defun xml-parse-file (file &optional parse-dtd parse-ns)
"Parse the well-formed XML file FILE.
If FILE is already visited, use its buffer and don't kill it.
Returns the top node with all its children.
If PARSE-DTD is non-nil, the DTD is parsed rather than skipped.
If PARSE-NS is non-nil, then QNAMES are expanded."
(if (get-file-buffer file)
(with-current-buffer (get-file-buffer file)
(save-excursion
(xml-parse-region (point-min)
(point-max)
(current-buffer)
parse-dtd parse-ns)))
(with-temp-buffer
(insert-file-contents file)
(xml-parse-region (point-min)
(point-max)
(current-buffer)
parse-dtd parse-ns))))
Re: xml-parse-file and text properties,
Richard Stallman <=
Re: xml-parse-file and text properties, Stefan Monnier, 2006/07/21
- Re: xml-parse-file and text properties, JD Smith, 2006/07/21
- Re: xml-parse-file and text properties, Stefan Monnier, 2006/07/21
- Re: xml-parse-file and text properties, JD Smith, 2006/07/21
- Re: xml-parse-file and text properties, Richard Stallman, 2006/07/22
- Re: xml-parse-file and text properties, Kenichi Handa, 2006/07/23
- Re: xml-parse-file and text properties, Stefan Monnier, 2006/07/23
- Re: xml-parse-file and text properties, Kenichi Handa, 2006/07/24
- Re: xml-parse-file and text properties, Richard Stallman, 2006/07/24