 <?xml-stylesheet type="text/css" href="https://flowerbunch.org.uk/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="https://flowerbunch.org.uk/Data/style/rss1.xsl" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <channel>
    <title>Blog</title>
    <link>https://flowerbunch.org.uk/blog</link>
    <description />
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>mojoPortal Blog Module</generator>
    <language>en-US</language>
    <ttl>120</ttl>
    <atom:link href="https://flowerbunch.org.uk/Blog/RSS.aspx?p=1~1~12" rel="self" type="application/rss+xml" />
    <itunes:owner />
    <itunes:explicit>no</itunes:explicit>
    <item>
      <title>Setting up a book catalogue with magic porage</title>
      <description><![CDATA[<p>Our books are all over the place – bookshelves all over the house with mixed up contents, and loads in cardboard boxes too (we moved house only 11 years ago). not surprisingly, it’s rather hard to find that book I’m sure I’ve got somewhere about Greek mythology, or whatever. So as a masterclass in displacement activity (from DIY and real work) I set up an Access database to catalogue all of our books.</p>  <p>After entering about 3 books it became apparent that this was a pretty boring activity, and my idea of getting the kids to do it was not well received even by Lois. So I hunted around for a web service that could do it for me with minimal effort. I found <a title="http://isbndb.com/" href="http://isbndb.com/" target="_blank">isbndb.com</a> and all my troubles were over. I’ve added a magic button to my data entry form to fetch data from the ISDBdb web service - all you have to enter is the 10-digit ISBN code, and the other fields are magically filled in for you.</p>  <p><a href="https://flowerbunch.org.uk/Data/Sites/1/media/wlw/image_16.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://flowerbunch.org.uk/Data/Sites/1/media/wlw/image_thumb_16.png" width="244" height="168" /></a></p>  <p>It’s quite a powerful API, allowing searching in a variety of ways and returning data about books, authors, subjects etc. For the moment I’m only using a simple ISBN look-up in an XMLHTTP request, where the request looks like this:</p> <a title="http://isbndb.com/api/books.xml?access_key=WJIH83BE&amp;index1=isbn&amp;value1=0500276056&amp;results=details,texts,subjects,authors&#13;&#10;" href="http://isbndb.com/api/books.xml?access_key=WJIH83BE&amp;index1=isbn&amp;value1=0500276056&amp;results=details,texts,subjects,authors">http://isbndb.com/api/books.xml?access_key=WJIH83BE&amp;index1=isbn&amp;value1=0500276056&amp;results=details,texts,subjects,authors   <br /></a>  <p>returning XML data like this:</p>  <pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">ISBNdb</span> <span class="attr">server_time</span><span class="kwrd">=&quot;2012-02-12T19:58:11Z&quot;</span><span class="kwrd">&gt;</span>
<span class="kwrd">  &lt;</span><span class="html">BookList</span> <span class="attr">total_results</span><span class="kwrd">=&quot;1&quot;</span> <span class="attr">page_size</span><span class="kwrd">=&quot;10&quot;</span> <span class="attr">page_number</span><span class="kwrd">=&quot;1&quot;</span> <span class="attr">shown_results</span><span class="kwrd">=&quot;1&quot;</span><span class="kwrd">&gt;</span>
<span class="kwrd">    &lt;</span><span class="html">BookData</span> <span class="attr">book_id</span><span class="kwrd">=&quot;archaeology_a33&quot;</span> <span class="attr">isbn</span><span class="kwrd">=&quot;0500276056&quot;</span> <span class="attr">isbn13</span><span class="kwrd">=&quot;9780500276051&quot;</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Title</span><span class="kwrd">&gt;</span>Archaeology<span class="kwrd">&lt;/</span><span class="html">Title</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">TitleLong</span><span class="kwrd">&gt;</span>Archaeology: theories, methods, and practice<span class="kwrd">&lt;/</span><span class="html">TitleLong</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">AuthorsText</span><span class="kwrd">&gt;</span>Colin Renfrew, Paul Bahn<span class="kwrd">&lt;/</span><span class="html">AuthorsText</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">PublisherText</span> <span class="attr">publisher_id</span><span class="kwrd">=&quot;thames_and_hudson&quot;</span><span class="kwrd">&gt;</span>New York : Thames and Hudson, c1991.<span class="kwrd">&lt;/</span><span class="html">PublisherText</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Details</span> <span class="attr">change_time</span><span class="kwrd">=&quot;2005-03-31T08:09:28Z&quot;</span> <span class="attr">price_time</span><span class="kwrd">=&quot;2011-12-31T01:26:57Z&quot;</span> <span class="attr">edition_info</span><span class="kwrd">=&quot;&quot;</span> <span class="attr">language</span><span class="kwrd">=&quot;eng&quot;</span> <span class="attr">physical_description_text</span><span class="kwrd">=&quot;543 p. : ill. (some col.)&quot;</span> <span class="attr">lcc_number</span><span class="kwrd">=&quot;CC165&quot;</span> <span class="attr">dewey_decimal_normalized</span><span class="kwrd">=&quot;&quot;</span> <span class="attr">dewey_decimal</span><span class="kwrd">=&quot;&quot;</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Summary</span><span class="kwrd">&gt;&lt;/</span><span class="html">Summary</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Notes</span><span class="kwrd">&gt;</span>Includes bibliographical references (p. 493-524) and index.<span class="kwrd">&lt;/</span><span class="html">Notes</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">UrlsText</span><span class="kwrd">&gt;&lt;/</span><span class="html">UrlsText</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">AwardsText</span><span class="kwrd">&gt;&lt;/</span><span class="html">AwardsText</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Subjects</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Subject</span> <span class="attr">subject_id</span><span class="kwrd">=&quot;archaeology&quot;</span><span class="kwrd">&gt;</span>Archaeology<span class="kwrd">&lt;/</span><span class="html">Subject</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;/</span><span class="html">Subjects</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;</span><span class="html">Authors</span><span class="kwrd">&gt;</span>
<span class="kwrd">        &lt;</span><span class="html">Person</span> <span class="attr">person_id</span><span class="kwrd">=&quot;renfrew_colin&quot;</span><span class="kwrd">&gt;</span>Renfrew, Colin<span class="kwrd">&lt;/</span><span class="html">Person</span><span class="kwrd">&gt;</span>
<span class="kwrd">        &lt;</span><span class="html">Person</span> <span class="attr">person_id</span><span class="kwrd">=&quot;bahn_paul_g&quot;</span><span class="kwrd">&gt;</span>Bahn, Paul G.<span class="kwrd">&lt;/</span><span class="html">Person</span><span class="kwrd">&gt;</span>
<span class="kwrd">      &lt;/</span><span class="html">Authors</span><span class="kwrd">&gt;</span>
<span class="kwrd">    &lt;/</span><span class="html">BookData</span><span class="kwrd">&gt;</span>
<span class="kwrd">  &lt;/</span><span class="html">BookList</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">ISBNdb</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>So it was a relatively simple matter to parse this XML (using MSXML) and bung the values into the right places. Actually it is not completely simple, because the data from the web service is rather variable, and doesn’t correspond directly with my data structure; for example, you can see from the example above that the PublisherText node contains a string that I would consider the publisher, publishing location, and publishing date, all mashed up together – slightly disappointing from a supposedly structured database. But hey it’s pretty good, and the result is we can now enter a new book in a few seconds.</p>

<pre class="csharpcode">&#160;</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style><br /><a href='https://flowerbunch.org.uk/setting-up-a-book-catalogue-with-magic-porage'>Crispin</a>&nbsp;&nbsp;<a href='https://flowerbunch.org.uk/setting-up-a-book-catalogue-with-magic-porage'>...</a>]]></description>
      <link>https://flowerbunch.org.uk/setting-up-a-book-catalogue-with-magic-porage</link>
      <author>crispin.flower@live.co.uk (Crispin)</author>
      <comments>https://flowerbunch.org.uk/setting-up-a-book-catalogue-with-magic-porage</comments>
      <guid isPermaLink="true">https://flowerbunch.org.uk/setting-up-a-book-catalogue-with-magic-porage</guid>
      <pubDate>Sun, 12 Feb 2012 20:03:56 GMT</pubDate>
    </item>
  </channel>
</rss>