<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SDK, API, and Driver Archives | DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/tag/sdk-api-and-driver/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Mon, 27 Jul 2026 21:16:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://static.dmcinfo.com/wp-content/uploads/2025/04/site-icon-150x150.png</url>
	<title>SDK, API, and Driver Archives | DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Easy XML Parsing in C#/.NET With the HTML Agility Pack</title>
		<link>https://static.dmcinfo.com/blog/24980/easy-xml-parsing-in-c-net-with-the-html-agility-pack/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Mon, 31 Oct 2016 16:57:45 +0000</pubDate>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[C# .NET Application Development]]></category>
		<category><![CDATA[SDK, API, and Driver]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24980/easy-xml-parsing-in-c-net-with-the-html-agility-pack/</guid>

					<description><![CDATA[<p>In 2006, the newspaper USA Today&#160;included the Internet in its list of the &#8220;New Seven Wonders of the World.&#8221; The Internet has democratized access to vast stores of information in an unprecedented way&#160;and has transformed many aspects of education, industry, and society. This glut of information can give tremendous insight into everything from trends in [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24980/easy-xml-parsing-in-c-net-with-the-html-agility-pack/">Easy XML Parsing in C#/.NET With the HTML Agility Pack</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In 2006, the newspaper <em>USA Today</em>&nbsp;included the Internet in its list of the &#8220;New Seven Wonders of the World.&#8221; The Internet has democratized access to vast stores of information in an unprecedented way&nbsp;and has transformed many aspects of education, industry, and society. This glut of information can give tremendous insight into everything from trends in the price of chop sticks&nbsp;to predicting regional flu outbreaks across the globe &#8211; if you know how to efficiently access it.&nbsp;</p>



<p class="wp-block-paragraph">I recently started a personal project to monitor the real estate market in Houston to gain insight into trends in pricing, neighborhood composition, construction, etc. One vital piece of the puzzle was reliably and efficiently gathering detailed information on specific properties to monitor over time. Using <a href="http://www.zillow.com/howto/api/APIOverview.htm">Zillow.com&#8217;s Developer APIs</a> and the <a href="https://html-agility-pack.net/">HTML Agility Pack</a>, I was able to spin up a prototype over coffee one Sunday morning, and I wanted to share my experience using this powerful C# library.</p>



<h2 id="h-the-zillow-api" class="wp-block-heading">The Zillow API</h2>



<p class="wp-block-paragraph">The majority of modern websites use JSON as the data exchange format, as it is easily consumed by the widely-used JavaScript language, but there are a significant number of sites (including Zillow.com) that use XML as the exchange format. There are advantages and disadvantages to each, but both formats are straightforward to parse and are human-readable.&nbsp;</p>



<p class="wp-block-paragraph">Zillow provides several useful APIs, and I chose <a href="https://www.bridgeinteractive.com/developers/zillow-group-data/" type="link" id="https://www.bridgeinteractive.com/developers/zillow-group-data/" target="_blank" rel="noreferrer noopener">GetDeepSearchResults</a> because it encapsulates most of the data I want to track in my application. The documentation is refreshingly complete and useful: you can see details about each field, the XML schema, error codes, and an example usage. After obtaining my developer API key, I scratched out a few lines of code to load the results.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">C#</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly> private void LoadResults(string property)
 {
     // Argument "property" is a URL-encoded string containing a single property address, city, and state
     string addr = "http://www.zillow.com/webservice/GetDeepSearchResults.htm";
     string key = "?&#91;My_API_Key&#93;&amp;";
     string results = String.Empty;

     // Create a new HTTP client to communicate with the Zillow server
     HttpClient client = new HttpClient();
     client.BaseAddress = new Uri(addr);

     // Load the results of the querty
     HttpResponseMessage response = client.GetAsync(key + property).Result;
     if (response.IsSuccessStatusCode)
     {
         results = response.Content.ReadAsStringAsync();
     }
     else
     {
         Debug.WriteLine("Web call failed with code " + response.StatusCode);
     }
     return results;
 }</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4"> </span><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">void</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">LoadResults</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">property</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #6A9955">     // Argument &quot;property&quot; is a URL-encoded string containing a single property address, city, and state</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">addr</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;http://www.zillow.com/webservice/GetDeepSearchResults.htm&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">key</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;?&#91;My_API_Key&#93;&amp;&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">results</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">String</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Empty</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">     // Create a new HTTP client to communicate with the Zillow server</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #4EC9B0">HttpClient</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">client</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">HttpClient</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">client</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">BaseAddress</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">Uri</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">addr</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">     // Load the results of the querty</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #4EC9B0">HttpResponseMessage</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">response</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">client</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetAsync</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">key</span><span style="color: #D4D4D4"> + </span><span style="color: #9CDCFE">property</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Result</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">response</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">IsSuccessStatusCode</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">     {</span></span>
<span class="line"><span style="color: #D4D4D4">         </span><span style="color: #9CDCFE">results</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">response</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Content</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">ReadAsStringAsync</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">     }</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #C586C0">else</span></span>
<span class="line"><span style="color: #D4D4D4">     {</span></span>
<span class="line"><span style="color: #D4D4D4">         </span><span style="color: #9CDCFE">Debug</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">WriteLine</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Web call failed with code &quot;</span><span style="color: #D4D4D4"> + </span><span style="color: #9CDCFE">response</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">StatusCode</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     }</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">results</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4"> }</span></span></code></pre></div>



<p class="wp-block-paragraph">The LoadResults function takes in a well-formed URL-encoded property listing string that meets the requirements listed in the API documentation, and returns either an empty string (if the API call failed) or an XML-encoded string containing the property details.</p>



<h2 id="h-parsing-with-agility" class="wp-block-heading">Parsing with Agility</h2>



<p class="wp-block-paragraph">I could have spent some time brewing up a <a href="https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx">RegEx</a>-powered parser for the XML results &#8211;&nbsp;after all, this is a well-documented API, and I know what to expect from each call. But why re-invent the wheel? It&#8217;s also worth pointing out that not all APIs (or web pages, which you can also easily scrape with the HTML Agility Pack) are as consistent and well-formed, so your homebrewed parser might work for a while until it tries to handle a malformed response.&nbsp;</p>



<p class="wp-block-paragraph">Using the Agility Pack and the Zillow documentation, I can easily parse out the XML tags I care about without writing a single regex.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">C#</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly> private PropertyData ParseResults(string results)
 {
     // Create an instance of the PropertyData to store the results
     PropertyData data = new PropertyData();

     // Load the API result string
     HtmlDocument doc = new HtmlDocument();
     doc.LoadHtml(results);

     // Find the parameters that will be tracked
     var zpid = doc.DocumentNode.Descendants("zpid").FirstOrDefault().InnerText;
     var finSize = doc.DocumentNode.Descendants("finishedSqFt").FirstOrDefault().InnerText;
     var zestValue = doc.DocumentNode.Descendants("amount").FirstOrDefault().InnerText;
     var baths = doc.DocumentNode.Descendants("bathrooms").FirstOrDefault().InnerText;
     var beds = doc.DocumentNode.Descendants("bedrooms").FirstOrDefault().InnerText;

     // Parse these value strings into their expected data types
     data.Zpid = int.Parse(zpid);
     data.FinishedSize = int.Parse(finSize);
     data.ZestValue = double.Parse(zestValue);
     data.Bathrooms = double.Parse(baths);
     data.Bedrooms = double.Parse(beds);

     return data;
 }</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4"> </span><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">PropertyData</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">ParseResults</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">results</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #6A9955">     // Create an instance of the PropertyData to store the results</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #4EC9B0">PropertyData</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">PropertyData</span><span style="color: #D4D4D4">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">     // Load the API result string</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #4EC9B0">HtmlDocument</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">HtmlDocument</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">LoadHtml</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">results</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">     // Find the parameters that will be tracked</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">zpid</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">DocumentNode</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Descendants</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;zpid&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">FirstOrDefault</span><span style="color: #D4D4D4">().</span><span style="color: #9CDCFE">InnerText</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">finSize</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">DocumentNode</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Descendants</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;finishedSqFt&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">FirstOrDefault</span><span style="color: #D4D4D4">().</span><span style="color: #9CDCFE">InnerText</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">zestValue</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">DocumentNode</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Descendants</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;amount&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">FirstOrDefault</span><span style="color: #D4D4D4">().</span><span style="color: #9CDCFE">InnerText</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">baths</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">DocumentNode</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Descendants</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;bathrooms&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">FirstOrDefault</span><span style="color: #D4D4D4">().</span><span style="color: #9CDCFE">InnerText</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">beds</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">doc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">DocumentNode</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Descendants</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;bedrooms&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">FirstOrDefault</span><span style="color: #D4D4D4">().</span><span style="color: #9CDCFE">InnerText</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">     // Parse these value strings into their expected data types</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Zpid</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Parse</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">zpid</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">FinishedSize</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Parse</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">finSize</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">ZestValue</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">double</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Parse</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">zestValue</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Bathrooms</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">double</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Parse</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">baths</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Bedrooms</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">double</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Parse</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">beds</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4"> }</span></span></code></pre></div>



<p class="wp-block-paragraph">That&#8217;s all there is to it! No bulky regular expressions or clunky homebrewed parsing code. For clarity, I stripped out a lot of input sanitation and error handling code, so don&#8217;t forget to check for exception conditions!</p>



<h2 id="h-other-applications" class="wp-block-heading">Other Applications</h2>



<p class="wp-block-paragraph">You may have an inkling that a parsing tool like the HTML Agility Pack can work for more than just parsing XML responses. You would be correct. Another key area where this library can come into play is data scraping (or web data extraction). If an API is not available or doesn&#8217;t give you all of the information you need, you can load the web page and parse the whole thing for the data you need.&nbsp;</p>



<p class="wp-block-paragraph">It&#8217;s very important to note that web scraping may violate the Terms of Use for a site, and if your scraping tool misbehaves and loads the webpage at a high rate, you run the risk of compromising the site&#8217;s resources and awaking the angry IT department kraken! Please be considerate, review the <a href="https://www.bloombergindustry.com/" type="link" id="https://www.bloombergindustry.com/">legality</a> of your application, and scrape responsibly!</p>



<p class="wp-block-paragraph">If you&#8217;ve used the HTML Agility Pack in an application or have questions about how I used it in mine, leave a comment below! Happy coding.</p>



<p class="wp-block-paragraph"><strong><a href="https://static.dmcinfo.com/services/application-development/web-application-development">Learn more about DMC&#8217;s web application development.</a></strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/24980/easy-xml-parsing-in-c-net-with-the-html-agility-pack/">Easy XML Parsing in C#/.NET With the HTML Agility Pack</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SharePoint of Contact 2: Integrating SharePoint 2010 with CRM Online</title>
		<link>https://static.dmcinfo.com/blog/28937/sharepoint-of-contact-2-integrating-sharepoint-2010-with-crm-online/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 29 May 2012 10:38:38 +0000</pubDate>
				<category><![CDATA[CRM]]></category>
		<category><![CDATA[Digital Workplace Solutions]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SDK, API, and Driver]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/28937/sharepoint-of-contact-2-integrating-sharepoint-2010-with-crm-online/</guid>

					<description><![CDATA[<p>SharePoint of Contact 2: Using CRM Online Data within SharePoint In this previous blog post, I explained how to integrate Microsoft Dynamics CRM with SharePoint 2010 using an External Content Type (ECT) linked to the Dynamics SQL Server instance. Today I will explain how to integrate Microsoft Dynamics CRM Online with SharePoint 2010, also using [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28937/sharepoint-of-contact-2-integrating-sharepoint-2010-with-crm-online/">SharePoint of Contact 2: Integrating SharePoint 2010 with CRM Online</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">SharePoint of Contact 2: Using CRM Online Data within SharePoint</p>



<p class="wp-block-paragraph">In this <a href="https://static.dmcinfo.com/blog/29316/sharepoint-of-contact-integrating-sharepoint-2010-with-microsoft-crm/" type="link" id="https://static.dmcinfo.com/blog/29316/sharepoint-of-contact-integrating-sharepoint-2010-with-microsoft-crm/">previous blog post</a>, I explained how to integrate Microsoft Dynamics CRM with SharePoint 2010 using an External Content Type (ECT) linked to the Dynamics SQL Server instance. Today I will explain how to integrate <a href="https://static.dmcinfo.com/services/digital-workplace-solutions/customer-relationship-management/" target="_blank" rel="noreferrer noopener">Microsoft Dynamics CRM Online</a> with <a href="https://static.dmcinfo.com/services/digital-workplace-solutions/sharepoint/" target="_blank" rel="noreferrer noopener">SharePoint 2010</a>, also using an ECT. Since CRM Online data is only accessible via web services, we will use a WCF web service-based ECT.</p>



<p class="wp-block-paragraph">First a note about why CRM Online data is only accessible via web services. CRM Online is Microsoft&#8217;s cloud-hosted CRM solution, so the location of the databases containing your data is not local. For this reason, we will not be able to pursue the strategy outlined in the first blog post, but will instead use the web services provided by CRM Online.</p>



<p class="wp-block-paragraph">Next, I will note that the CRM Online web services can only be used by a client running .NET 4. SharePoint 2010 is built with .NET 3.5, so SharePoint&#8217;s Business Connectivity Services (BCS) cannot connect directly to the CRM Online web service. Instead, we will build an intermediary web service that runs on an application pool using the .NET 4 runtime and has a BCS-compatible interface.</p>



<p class="wp-block-paragraph">To start,&nbsp;set up a CRM Online account (if you do not already have one )and associate it with a Windows Live ID. Once you can access your CRM Online account in a web browser, download the CRM 2011 SDK.</p>



<p class="wp-block-paragraph">Within the &#8220;bin&#8221; directory of the CRM SDK find the crmsvcutil executable. This tool will generate the CRM data model used by your CRM Online site in code so that we will be able to use Linq to query CRM data. The syntax of the tool follows.</p>



<p class="wp-block-paragraph">crmsvcutil.exe /url:https://[Site/ Name].crm.dynamics.com/XRMServices/2011/Organization.svc /out:CrmDataModel.cs /username:&#8221;[Live ID]&#8221; /password:&#8221;[Password]&#8221;</p>



<p class="wp-block-paragraph">The file CrmDataModel.cs will be used in your web service.</p>



<p class="wp-block-paragraph">Next, open up Visual Studio 2010 and create a new project based on a WCF Web Service template. Be sure to set the .NET Framework version to 4. Add CrmDataModel.cs to the project.</p>



<p class="wp-block-paragraph">I would also suggest deleting the default web service item from the project and adding a new one with a more specific name.</p>



<p class="wp-block-paragraph">Next, flesh out the web service so that it can gather the desired entities from CRM Online and deliver them to the web service consumer. Please see this <a href="https://lightningtools.com/" type="link" id="https://lightningtools.com/">blog for example code</a> on how to use the CRM data model. If designing the web service to be used as part of an ECT, keep in mind the CRRUD operations (Create, Read List, Read Item, Update, Delete) that an ECT supports.</p>



<p class="wp-block-paragraph">Next test out the web service. Visual Studio 2010 has a great point-and-click client for testing out web services that is opened when you begin debugging the web service through the IDE. If testing on a server that does not have Visual Studio 2010 installed, I have found that <a href="http://wcfstorm.com/wcf/wcfstorm-lite.aspx">WCFStorm Lite</a> is a great tool for reproducing the behavior of the Visual Studio WCF client.</p>



<p class="wp-block-paragraph">Once you have verified that the web service is functional, you will have to create a web site and application pool to host it. Please remember that since this web service is unsecured, it should run either on a server that is not externally accessible or on a closed port. When adding the web site, make sure to grant the user IIS_IUSRS read/execute permissions to the site. This can be done through IIS Manager by right-clicking on the site folder and selecting Permissions. Also, remember when creating the application pool to be used by this site to set it to use the .NET 4 Framework. This can be done by selecting the application pool in IIS Manager and configuring Basic Settings. Lastly in IIS set the &#8220;Load User Profile&#8221; option to true under the Advanced Settings of the application pool.</p>



<p class="wp-block-paragraph">Add the web service to the site by selecting the WCF project folder you created as a web application. This should be the location of the .svc files generated when building the project. You may need to grant permissions to this application to IIS_IUSRS. Fire up a browser and navigate to the new site you created &#8211; you should receive a page summarizing the web service.</p>



<p class="wp-block-paragraph">If installing the web service on a server different than that hosting Visual Studio, be sure to copy the .svc files, the web.config configuration file, and the code assembly containing the service&#8217;s logic. This assembly should be placed in a &#8220;bin&#8221; folder that resides at the same location as the web application folder holding the .svc files.</p>



<p class="wp-block-paragraph">To test the web service, debug one of the service&#8217;s code-behind files, or start up WCFStorm. If debugging through Visual Studio 2010, the methods available through the service should be available, as well as the arguments that can be passed to each method. The interface for WCFStorm is similar.</p>



<p class="wp-block-paragraph">After the web service has been tested and the data returned has been verified, you can create an ECT using the WCF service rather than a SQL Server view as explained in the previous SharePoint-CRM integration <a href="https://static.dmcinfo.com/blog/29316/sharepoint-of-contact-integrating-sharepoint-2010-with-microsoft-crm/">blog post</a>. You can also use the web service as a service reference in another .NET project &#8211; with any framework version.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28937/sharepoint-of-contact-2-integrating-sharepoint-2010-with-crm-online/">SharePoint of Contact 2: Integrating SharePoint 2010 with CRM Online</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Office Autonomous Robot</title>
		<link>https://static.dmcinfo.com/blog/29245/office-autonomous-robot/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 17:24:10 +0000</pubDate>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[SDK, API, and Driver]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/29245/office-autonomous-robot/</guid>

					<description><![CDATA[<p>With the imminent arrival of DMC’s second FedEx Day, the brainstorming began. Amid ideas to improve our internal network and everyday tasks, the idea to one day take over the world started gaining support. Everyone knows that the first step towards world domination is the creation of your very own robot army. With that in [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/29245/office-autonomous-robot/">Office Autonomous Robot</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">With the imminent arrival of <a href="https://static.dmcinfo.com/blog/29298/dmc-fedex-day-redux/" type="post" id="29298">DMC’s second FedEx Day</a>, the brainstorming began. Amid ideas to improve our internal network and everyday tasks, the idea to one day take over the world started gaining support. Everyone knows that the first step towards world domination is the creation of your very own robot army. With that in mind, DMC decided it was time to build its own office autonomous robot.</p>



<h2 id="h-hardware-selection" class="wp-block-heading">Hardware Selection</h2>



<p class="wp-block-paragraph">In order for our robot to provide a lasting platform for autonomous development, DMC wanted a platform that would allow great expandability as well as a very open source structure so as not to limit the robot&#8217;s future capabilities. Also, since this project would be starting as a one-day initiative it was decided to keep entry costs low and leverage several commercial technologies to allow a viable product after one day of work.</p>



<p class="wp-block-paragraph">DMC came up with a simple set of parameters for hardware selection:</p>



<h3 id="h-expandability" class="wp-block-heading">Expandability</h3>



<ul class="wp-block-list">
<li>DMC will be continually adding features and does not want to be limited by the base platform</li>
</ul>



<h3 id="h-standard-communication-protocol" class="wp-block-heading">Standard communication protocol</h3>



<ul class="wp-block-list">
<li>A well-documented command set over serial would save initial setup time and increase compatibility with different hardware and programming languages.</li>
</ul>



<h3 id="h-wireless-connectivity" class="wp-block-heading">Wireless connectivity</h3>



<ul class="wp-block-list">
<li>This will allow large amounts of processing power from a central command server without having to worry about power consumption and allow the robot to freely navigate the office.</li>
</ul>



<h3 id="h-commercial-product" class="wp-block-heading">Commercial product</h3>



<ul class="wp-block-list">
<li>Although this may limit some expandability and configurability, a commercially available platform will save significant hardware setup and debugging time.</li>
</ul>



<h3 id="h-streaming-video" class="wp-block-heading">Streaming video</h3>



<ul class="wp-block-list">
<li>Image processing provides a large range of automation possibilities as well as unique content generation for DMC</li>
</ul>



<h3 id="h-affordability" class="wp-block-heading">Affordability</h3>



<ul class="wp-block-list">
<li>The goal was to keep the initial cost of the robot around $500</li>
</ul>



<p class="wp-block-paragraph">Based on the above criteria, DMC chose to center the autonomous robot project on three primary components</p>



<h3 id="h-irobot-create" class="wp-block-heading">IRobot Create</h3>



<p class="wp-block-paragraph">The IRobot Create is the development version of the popular Roomba automated vacuum. It includes all the functionality of the Roomba minus the vacuum and adds several additional sensors and a much more expandable I/O configuration.&nbsp;</p>



<p class="wp-block-paragraph">DMC chose this for their robot platform for several reasons. The product is well supported by IRobot and has a lot of expandability out-of-the-box. IRobot also supplies a well-documented command set and SDK. Additionally, since it is a well-known product, there is lots of community support including drivers in Microsoft Robotic Studio.</p>



<p class="wp-block-paragraph">DMC purchased the IRobot Create development kit which includes the robot, a docking and charging station, high-capacity battery and several other components. Additionally, a BAM Bluetooth module was also purchased to provide wireless serial communication with the robot.</p>



<h3 id="h-foscam-1918fw-wireless-ip-camera" class="wp-block-heading">Foscam 1918FW Wireless IP Camera</h3>



<p class="wp-block-paragraph">Since it was decided to concentrate processing on a central command server, it was necessary to provide streaming video from the robot. Several companies offer wireless IP cameras that connect to a local Wi-Fi network and can stream video to any computer on the network. A Foscam 1981 was chosen due to its availability, price, and ability to be powered from standard 5V dc.</p>



<h3 id="h-roborealm" class="wp-block-heading">RoboRealm</h3>



<p class="wp-block-paragraph">RoboRealm is a third-party vision software program that provides easy access to a wide array of vision algorithms and supports plugins to control a large amount of hardware. Additionally, the software provides basic web hosting and a well-documented API for use in other languages. This software was chosen due to its short learning curve, great out-of-box support, and the adaptability to several languages or shifts in designs.</p>



<h3 id="h-building-and-programming-the-robot" class="wp-block-heading">Building and Programming the Robot</h3>



<p class="wp-block-paragraph">Following the included documentation, the IRobot Create was set up to communicate across its Bluetooth network with the host PC. The Foscam camera was also set up on DMC’s local network using a LAN connection and then configured to connect to the wireless network on power-up.&nbsp;</p>



<p class="wp-block-paragraph">Once configured, the camera was attached to the top of the IRobot Create and connected to the robot&#8217;s switched battery power supply using a 5V regulator. This was necessary since the robot&#8217;s 5V outputs were not capable of providing the current necessary to power the camera.</p>



<p class="wp-block-paragraph">DMC leveraged the out-of-box functions in RoboRealm to create a working robot in a short timescale. The programming module involves a scan cycle based on the incoming frame rate from the chosen camera. Different modules can be dragged and dropped into this scan cycle, and they include image manipulation algorithms, command modules, general logic functions, and scripts in several languages.&nbsp;</p>



<p class="wp-block-paragraph">Once placed in the processing pipeline, the modules can be configured based on their specific function. The software comes packaged with plugins for both the IRobot Create and Foscam camera that handle the low-level communication with each device and allow commands and statuses to be sent/read using user-created variables. Below is an image of the three primary modules used in the autonomous robot as well as the processing pipeline.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf2119c5e36&quot;}" data-wp-interactive="core/image" data-wp-key="6abf2119c5e36" class="wp-block-image aligncenter size-large is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://cdn.dmcinfo.com/wp-content/uploads/2025/05/27153404/RobotMain.png.webp" alt="" style="width:449px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">We can now go into detail on each of these areas, starting with the image stream.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"></p></p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf2119c5fd5&quot;}" data-wp-interactive="core/image" data-wp-key="6abf2119c5fd5" class="wp-block-image aligncenter size-large is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://cdn.dmcinfo.com/wp-content/uploads/2025/05/27153403/RobotStream.png.webp" alt="" style="width:437px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">The image stream shows the current video stream from the chosen camera, in our case, the Foscam’s wireless stream. The image stream also shows the results of all the image processing up to the selected step in the processing pipeline. Additionally, if the web server is set up, this is the same image that is streamed to the site.</p>



<p class="wp-block-paragraph">Next, we will look at the processing pipeline.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf2119c6123&quot;}" data-wp-interactive="core/image" data-wp-key="6abf2119c6123" class="wp-block-image aligncenter size-large is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://cdn.dmcinfo.com/wp-content/uploads/2025/05/27153403/RobotPipeline.png.webp" alt="" style="width:435px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">This is where the overall robot functionality and image processing is defined. Functionality is added by placing modules into this pipeline and programming their functionality.&nbsp;</p>



<p class="wp-block-paragraph">At the very top, you see the programming block for our wireless camera. This block allows the address of the video stream to be defined along with login information for the camera&#8217;s controls. It also allows a variable to be set controlling the pan and tilt of the camera.&nbsp;</p>



<p class="wp-block-paragraph">The majority of the processing pipeline after the camera is devoted to three different operating modes. Within each operating mode, there is a set of image processing modules that return a set of variables derived from the incoming image stream as well as a VBScript module that computes robot commands based on these image variables. Lastly, there is the IRobot create a module that defines several variables used in the script modules to control aspects of the robot.</p>



<p class="wp-block-paragraph">We will now look at the script module in more detail as this controls most of the robot&#8217;s operation logic.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf2119c629c&quot;}" data-wp-interactive="core/image" data-wp-key="6abf2119c629c" class="wp-block-image aligncenter size-large is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://cdn.dmcinfo.com/wp-content/uploads/2025/05/27153402/RobotScript.png.webp" alt="" style="width:270px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">The scripting module allows you to write scripts in several languages (visual basic in our case) to provide logic for your processing stream based on variables defined in other modules. In our program, these scripts are used to take data from the image processing and robot sensors and use it to send movement commands to the robot.&nbsp;</p>



<p class="wp-block-paragraph">For example, most of the image processing produces x and y coordinates of a targeted item on the image (line, farthest clear path, etc.). These coordinates are then used to set the variables defining the robot&#8217;s left and right motor speeds to different values telling the robot to move forward, backward or turn.&nbsp;</p>



<p class="wp-block-paragraph">Other variables representing the robot&#8217;s sensors can also be queried to help control the robot (e.g. when the front bump sensor detects an object and the robot moves backward).</p>



<p class="wp-block-paragraph">Lastly, we will look at both the camera and robot modules.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"></p></p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf2119c6436&quot;}" data-wp-interactive="core/image" data-wp-key="6abf2119c6436" class="wp-block-image aligncenter size-large is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://cdn.dmcinfo.com/wp-content/uploads/2025/05/27153402/RobotModules.png.webp" alt="" style="width:289px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">These modules don’t provide any specific programmability, but rather allow variables to be assigned to different functions of the robot and camera. By including them in the processing pipeline, they also handle all low-level communication with each device to constantly update variables and send commands.</p>



<h3 id="h-web-deployment" class="wp-block-heading">Web Deployment</h3>



<p class="wp-block-paragraph">Finally, to allow control of the robot by any computer in the office, the robot&#8217;s controls were deployed to an internal website using RoboRealm’s web hosting feature. By activating the web server feature, RoboRealm publishes a website on the host computer using files customizable by the programmer and a JavaScript interface to send and receive variables from the web page.&nbsp;</p>



<p class="wp-block-paragraph">The web page was set up to allow manual control of both the robot and camera as well as activation of the two autonomous modes and the IRobot’s default docking program. It also updates the user with the state of various sensors on the robot as well as battery levels. DMC leveraged an example page from RoboRealm’s tutorials to facilitate the creation of a functional and appealing web page.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf2119c65bb&quot;}" data-wp-interactive="core/image" data-wp-key="6abf2119c65bb" class="wp-block-image aligncenter size-large is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://cdn.dmcinfo.com/wp-content/uploads/2025/05/27153401/RobotWeb.jpg.webp" alt="" style="width:459px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Be sure to check back for continued development of the DMC autonomous robot!</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/29245/office-autonomous-robot/">Office Autonomous Robot</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
