Function: shr-dom-to-xml

shr-dom-to-xml is a byte-compiled function defined in shr.el.gz.

Signature

(shr-dom-to-xml DOM &optional CHARSET)

Source Code

;; Defined in /usr/src/emacs/lisp/net/shr.el.gz
(defun shr-dom-to-xml (dom &optional charset)
  (with-temp-buffer
    (shr-dom-print dom)
    (when charset
      (encode-coding-region (point-min) (point-max) charset)
      (goto-char (point-min))
      (insert (format "<?xml version=\"1.0\" encoding=\"%s\"?>\n"
                      charset)))
    (buffer-string)))