<?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>just_add_watir &#124; Advanced recipes for Watir &#187; :xpath</title>
	<atom:link href="http://justaddwatir.com/tag/xpath/feed/" rel="self" type="application/rss+xml" />
	<link>http://justaddwatir.com</link>
	<description>Advanced recipes for Watir</description>
	<lastBuildDate>Wed, 21 Oct 2009 02:44:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Q. How do I deal with an &amp; character in my xpath?</title>
		<link>http://justaddwatir.com/2008/q-how-do-i-deal-with-an-character-in-my-xpath/</link>
		<comments>http://justaddwatir.com/2008/q-how-do-i-deal-with-an-character-in-my-xpath/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 04:03:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[:xpath]]></category>

		<guid isPermaLink="false">http://justaddwatir.com/watir/?p=4</guid>
		<description><![CDATA[A. Use the & amp; escape character ...
Example html:

  &#60;tr&#62;
    &#60;td&#62;
      Data &#38;amp; Elements
    &#60;/td&#62;
  &#60;/tr&#62;

Example watir:

@b.cell&#40;:xpath, &#34;//th[contains(text(),'Header')]&#34;&#41;.flash
@b.cell&#40;:xpath, &#34;//td[contains(text(),'Data &#38;amp; Elements')]&#34;&#41;.flash

 
]]></description>
			<content:encoded><![CDATA[<p><strong>A. Use the & amp; escape character ...</strong><br />
<a href="'http://justaddwatir.com/watir/test_html/tc_0001_0100/test_0002.html">Example html</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      Data <span style="color: #ddbb00;">&amp;amp;</span> Elements
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span></pre></div></div>

<p>Example watir:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#0066ff; font-weight:bold;">@b</span>.<span style="color:#9900CC;">cell</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:xpath</span>, <span style="color:#996600;">&quot;//th[contains(text(),'Header')]&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">flash</span>
<span style="color:#0066ff; font-weight:bold;">@b</span>.<span style="color:#9900CC;">cell</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:xpath</span>, <span style="color:#996600;">&quot;//td[contains(text(),'Data &amp;amp; Elements')]&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">flash</span></pre></div></div>

<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwatir.com/2008/q-how-do-i-deal-with-an-character-in-my-xpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
