;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'cl-lib) #@79 When non-nil xmlgen will escape the characters <>\='"& in an attribute value. (defvar xmlgen-escape-attribute-vals t (#$ . 105)) #@80 When non-nil xmlgen will escape the characters <>\='"& in an elements content. (defvar xmlgen-escape-elm-vals t (#$ . 240)) #@111 List of (FIND . REPLACE) pairs for escaping. See `xmlgen-escape-elm-vals' and `xmlgen-escape-attribute-vals'. (defvar xmlgen-escapees '(("&" . "&") ("'" . "'") ("\"" . """) ("<" . "<") (">" . ">")) (#$ . 371)) #@142 Convert a sexp FORM to xml: \='(p :class "big")) => "

". IN-ELM is ignored. LEVEL is the element level and defaults to 0. (defalias 'xmlgen #[(form &optional in-elm level) "\206\306 \247\203\307 !\202\222 ;\203 \202\222 <\205\222\310 !\211G\311U\2032\n\211A\242\2029\312\313\314\nGD\"\n\242 @\2119\204J\315\316 \"\210 \317>\203c \320=\205W\321\322\323 A\324#)\202\221\325 !\326 \327\f! G\330V\203\217\331\322\332\203\203\333\334 A\"\202\205 A\324#\335 \331\260\202\220\336R,)\207" [level form #1=#:--cl-rest-- xml attrs el 0 number-to-string xmlgen-extract-plist 2 signal wrong-number-of-arguments (xml attrs) error "Element must be a symbol (got %S)" (!unescape !escape) !escape t mapconcat #[(s) "\303 \nT#\207" [s in-elm level xmlgen] 4] "" symbol-name "<" xmlgen-attr-to-string 1 ">" #[(s) "\303 \nT#\207" [s el level xmlgen] 4] mapcar xmlgen-string-escape "" xmlgen-escape-elm-vals] 10 (#$ . 608)]) #@42 Escape STRING for inclusion in some XML. (defalias 'xmlgen-string-escape #[(string) ";\203\n\302\303 \"\210\207" [string xmlgen-escapees mapc #[(e) "\302@A #\211\207" [e string replace-regexp-in-string] 4]] 3 (#$ . 1578)]) #@42 Convert a PLIST to xml style attributes. (defalias 'xmlgen-attr-to-string #[(plist) "\306 \203@ \211A\242 \211A\242\211\247\203\307 !\202# ;\205# \310\311\n!\312\313O\314 \2037\315\f!\2028\f\316\260+\202)\207" [res plist sym val treated xmlgen-escape-attribute-vals "" number-to-string " " symbol-name 1 nil "=\"" xmlgen-string-escape "\""] 7 (#$ . 1813)]) #@88 Extract a plist from LIST returning the original list without the plist and the plist. (defalias 'xmlgen-extract-plist #[(list) "\304\211\211\305\306 \"\210\203\307\310\311!\"\210\n +D\207" [last-keyword plist nlist list nil mapc #[(item) "\211A\242\n\203\305 \nC\"\305 C\"\306\211\202/\307 !\203( \211\202/\305\f C\"\211)\207" [list item last-keyword plist nlist append nil keywordp] 3] error "No value to satisfy keyword '%s'" symbol-name] 4 (#$ . 2195)]) (provide 'xmlgen)