<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-4756218974134955062.post7687339984162065901..comments</id><updated>2011-02-03T01:51:09.678-08:00</updated><category term='ui'/><category term='android'/><category term='widget'/><category term='lifehacking'/><title type='text'>Comments on blog.bookworm.at: Pretty Print XML With Emacs</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.bookworm.at/feeds/7687339984162065901/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html'/><author><name>Benjamin Ferrari</name><uri>https://profiles.google.com/104654727308331649467</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-UhrdwDEnohI/AAAAAAAAAAI/AAAAAAAADjk/eV-w7Vwz3K4/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4756218974134955062.post-3193907607159555746</id><published>2011-02-03T01:51:09.678-08:00</published><updated>2011-02-03T01:51:09.678-08:00</updated><title type='text'>@Doc Avid: 
Thanks for the fix!
 I updated my post...</title><content type='html'>@Doc Avid: &lt;br /&gt;Thanks for the fix!&lt;br /&gt; I updated my post with your code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/3193907607159555746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/3193907607159555746'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html?showComment=1296726669678#c3193907607159555746' title=''/><author><name>Benjamin Ferrari</name><uri>http://www.blogger.com/profile/10212336833198274102</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html' ref='tag:blogger.com,1999:blog-4756218974134955062.post-7687339984162065901' source='http://www.blogger.com/feeds/4756218974134955062/posts/default/7687339984162065901' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1170626992'/></entry><entry><id>tag:blogger.com,1999:blog-4756218974134955062.post-4616348850107555302</id><published>2011-02-02T17:50:16.576-08:00</published><updated>2011-02-02T17:50:16.576-08:00</updated><title type='text'>Don&amp;#39;t like how Tidy works. I&amp;#39;ve been using...</title><content type='html'>Don&amp;#39;t like how Tidy works. I&amp;#39;ve been using your function for some time. Thanks!&lt;br /&gt;&lt;br /&gt;Always been somewhat bothered by how with larger XML regions, it sometimes leaves the last few lines or so unindented. I just finally got annoyed enough to fix it.&lt;br /&gt;&lt;br /&gt;Just need to increment the end variable after adding the newline to compensate for the fact that you&amp;#39;re making the region larger.&lt;br /&gt;&lt;br /&gt;(defun bf-pretty-print-xml-region (begin end)&lt;br /&gt;  &amp;quot;Pretty format XML markup in region. You need to have nxml-mode&lt;br /&gt;http://www.emacswiki.org/cgi-bin/wiki/NxmlMode installed to do&lt;br /&gt;this.  The function inserts linebreaks to separate tags that have&lt;br /&gt;nothing but whitespace between them.  It then indents the markup&lt;br /&gt;by using nxml&amp;#39;s indentation rules.&amp;quot;&lt;br /&gt;  (interactive &amp;quot;r&amp;quot;)&lt;br /&gt;  (save-excursion&lt;br /&gt;  (nxml-mode)&lt;br /&gt;  (goto-char begin)&lt;br /&gt;  (while (search-forward-regexp &amp;quot;\&amp;gt;[ \\t]*\&amp;lt;&amp;quot; nil t) &lt;br /&gt;   (backward-char) (insert &amp;quot;\n&amp;quot;) (setq end (1+ end)))&lt;br /&gt;  (indent-region begin end))&lt;br /&gt; (message &amp;quot;Ah, much better!&amp;quot;))</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/4616348850107555302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/4616348850107555302'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html?showComment=1296697816576#c4616348850107555302' title=''/><author><name>Doc Avid</name><uri>http://www.blogger.com/profile/12190917488178626184</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html' ref='tag:blogger.com,1999:blog-4756218974134955062.post-7687339984162065901' source='http://www.blogger.com/feeds/4756218974134955062/posts/default/7687339984162065901' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1995217095'/></entry><entry><id>tag:blogger.com,1999:blog-4756218974134955062.post-1071374105066600702</id><published>2010-12-02T00:13:32.933-08:00</published><updated>2010-12-02T00:13:32.933-08:00</updated><title type='text'>well done, much thx!</title><content type='html'>well done, much thx!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/1071374105066600702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/1071374105066600702'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html?showComment=1291277612933#c1071374105066600702' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html' ref='tag:blogger.com,1999:blog-4756218974134955062.post-7687339984162065901' source='http://www.blogger.com/feeds/4756218974134955062/posts/default/7687339984162065901' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1592869431'/></entry><entry><id>tag:blogger.com,1999:blog-4756218974134955062.post-4841929707625075458</id><published>2010-05-24T18:30:45.995-07:00</published><updated>2010-05-24T18:30:45.995-07:00</updated><title type='text'>Just what I was looking for! Thanks!</title><content type='html'>Just what I was looking for! Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/4841929707625075458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/4841929707625075458'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html?showComment=1274751045995#c4841929707625075458' title=''/><author><name>Matt</name><uri>http://www.littleredbat.net/mk/blog</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html' ref='tag:blogger.com,1999:blog-4756218974134955062.post-7687339984162065901' source='http://www.blogger.com/feeds/4756218974134955062/posts/default/7687339984162065901' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1303145058'/></entry><entry><id>tag:blogger.com,1999:blog-4756218974134955062.post-8274257767221949497</id><published>2010-03-03T06:01:19.527-08:00</published><updated>2010-03-03T06:01:19.527-08:00</updated><title type='text'>I love this piece of software !!! Before I used xm...</title><content type='html'>I love this piece of software !!! Before I used xmllint (from cygwin) but this is easier to use.&lt;br /&gt;&lt;br /&gt;One note however: CDATA blocks are not properly indented. But again this might be a feature of the indentation routine of nxml rather than a problem in the &amp;quot;Pretty print XML&amp;quot; code. For xml with CDATA sections xmllint might indent better.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/8274257767221949497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/8274257767221949497'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html?showComment=1267624879527#c8274257767221949497' title=''/><author><name>calculateonlinedotorg</name><uri>http://calculateonline.org</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html' ref='tag:blogger.com,1999:blog-4756218974134955062.post-7687339984162065901' source='http://www.blogger.com/feeds/4756218974134955062/posts/default/7687339984162065901' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-876309409'/></entry><entry><id>tag:blogger.com,1999:blog-4756218974134955062.post-9182995405370487078</id><published>2009-05-06T00:21:00.000-07:00</published><updated>2009-05-06T00:21:00.000-07:00</updated><title type='text'>nice job.
I'm using your function with &lt;b&gt;(delete-...</title><content type='html'>nice job.&lt;br /&gt;I'm using your function with &lt;B&gt;(delete-trailing-whitespace)&lt;/B&gt; function after &lt;B&gt; (indent region begin end) &lt;/B&gt;.&lt;br /&gt;regards</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/9182995405370487078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4756218974134955062/7687339984162065901/comments/default/9182995405370487078'/><link rel='alternate' type='text/html' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html?showComment=1241594460000#c9182995405370487078' title=''/><author><name>nagi</name><uri>http://www.blogger.com/profile/15383855999737332283</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html' ref='tag:blogger.com,1999:blog-4756218974134955062.post-7687339984162065901' source='http://www.blogger.com/feeds/4756218974134955062/posts/default/7687339984162065901' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1625044376'/></entry></feed>
