diff lisp/xml.el @ 98529:2a05b2390d45

(xml-parse-string): Use skip-chars-forward.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 05 Oct 2008 19:01:53 +0000
parents ee5932bf781d
children a9dc0e7c3f2b
line wrap: on
line diff
--- a/lisp/xml.el	Sun Oct 05 19:01:45 2008 +0000
+++ b/lisp/xml.el	Sun Oct 05 19:01:53 2008 +0000
@@ -494,9 +494,7 @@
 (defun xml-parse-string ()
   "Parse the next whatever.  Could be a string, or an element."
   (let* ((pos (point))
-	 (string (progn (if (search-forward "<" nil t)
-			    (forward-char -1)
-			  (goto-char (point-max)))
+	 (string (progn (skip-chars-forward "^<")
 			(buffer-substring-no-properties pos (point)))))
     ;; Clean up the string.  As per XML specifications, the XML
     ;; processor should always pass the whole string to the