elisp libxml-parse-html-region return NIL -
here elisp code (test url "http://httpbin.org/html") (with-current-buffer (url-retrieve-synchronously my-url) (goto-char (point-min)) (re-search-forward "^$") (delete-region (point) (point-min)) (setq dom (libxml-parse-html-region (point-min) (point-max))) (hoge--log-trace "current buffer content: %s" (buffer-string)) (hoge--log-trace "dom is: %s" dom) ) parse html use elisp function "libxml-parse-html-region" result is: current buffer content: <!doctype html> <html> <head> </head> <body> <h1>herman melville - moby-dick</h1> <div> <p> availing himself ... </p> </div> </body> </html> dom is: nil
as can see buffer has content, elisp function libxml-parse-html-region return nill , result dom object nil. why?
Comments
Post a Comment