url-retrieve-synchronously 함수를 사용하고 응답을 포함하는 버퍼를 반환합니다. 응답의 본문을 가져 와서 xml-parse-region에 전달할 수있는 비 해킹 방법이 있는지 궁금합니다.emacs의 url에서 xml을 어떻게 파싱합니까?
xml-parse-from-url 함수가 있습니까? url-retrieve에서 응답을 어떻게 파싱합니까?
url-retrieve-synchronously 함수를 사용하고 응답을 포함하는 버퍼를 반환합니다. 응답의 본문을 가져 와서 xml-parse-region에 전달할 수있는 비 해킹 방법이 있는지 궁금합니다.emacs의 url에서 xml을 어떻게 파싱합니까?
xml-parse-from-url 함수가 있습니까? url-retrieve에서 응답을 어떻게 파싱합니까?
및 반환 구문 분석 응답 :
(defun identica-get-response-body (&optional buffer)
"Extract HTTP response body from HTTP response, parse it as XML, and return a XML tree as list.
`buffer' may be a buffer or the name of an existing buffer.
If `buffer' is omitted, current-buffer is parsed.
Removed the call to `identica-clean-response-body'."
(or buffer
(setq buffer (current-buffer)))
(set-buffer buffer)
(set-buffer-multibyte t)
(let ((start (save-excursion
(goto-char (point-min))
(and (re-search-forward "<\?xml" (point-max) t)
(match-beginning 0)))))
;;(identica-clean-response-body) ; necessary for identica, cleaned up some weird characters
(and start
(xml-parse-region start (point-max)))))
이맥스와 함께 배포 된 패키지 중 일부가 어떻게 사용되는지 살펴볼 수 있습니다. 예 : lisp/net/newst-backend.el
및 lisp/net/soap-client.el
.
당신이 붙여 넣을 수 일부 코드? 나는 자기 자신의 로컬 설치에서 이맥스를 발견 할 수 없었다. 나는'find-grep'의'url-retrieve'를 사용하려고 시도했다. –