<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>EvoTalk</title>
	
	<link>http://evotalk.net/blog</link>
	<description />
	<lastBuildDate>Fri, 04 Dec 2009 13:45:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Evotalk" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Virtual Network Adapter</title>
		<link>http://feedproxy.google.com/~r/Evotalk/~3/5G4TjZ2TJDo/virtual-network-adapter.html</link>
		<comments>http://evotalk.net/blog/2009/12/virtual-network-adapter.html#comments</comments>
		<pubDate>Fri, 04 Dec 2009 13:45:17 +0000</pubDate>
		<dc:creator>asd</dc:creator>
				<category><![CDATA[科技新知]]></category>
		<category><![CDATA[軟體使用]]></category>

		<guid isPermaLink="false">http://evotalk.net/blog/?p=1285</guid>
		<description><![CDATA[在WinXP上安裝一張虛擬網路卡，用途是在無法存取網路時，在虛擬網路環境中測試。
例如本機 WinXP 使用網芳或 ssh 與 vmware 上的 linux 連線
安裝步驟如下
1. [控制台]-&#62;「新增硬體]
2. 按一下 [是，我已連接這個硬體]，然後按一下 [下一步]。
3. 按一下位於清單底部的 [新增硬體裝置]，然後按一下 [下一步]。
4. 按一下 [安裝我從清單中手動選取的硬體]，再按一下 [下一步]。
5. 按一下 [網路介面卡]，再按一下 [下一步]。
6. 在 [製造商] 方塊中，按一下 [Microsoft]。
7. 在 [網路介面卡] 方塊中，按一下 [Microsoft Loopback Adapter]，然後按一下 [下一步]。
8. 按一下 [完成]。
參考

如何在 Windows XP 中安裝 Microsoft 迴路介面卡

1. [控制台]-&#62;「新增硬體]
2. 按一下 [是，我已連接這個硬體]，然後按一下 [下一步]。
3. 按一下位於清單底部的 [新增硬體裝置]，然後按一下 [下一步]。
4. 按一下 [安裝我從清單中手動選取的硬體]，再按一下 [下一步]。
5. 按一下 [網路介面卡]，再按一下 [下一步]。
6. 在 [製造商] [...]]]></description>
			<content:encoded><![CDATA[<p>在WinXP上安裝一張虛擬網路卡，用途是在無法存取網路時，在虛擬網路環境中測試。<br />
例如本機 WinXP 使用網芳或 ssh 與 vmware 上的 linux 連線</p>
<p>安裝步驟如下<br />
1. [控制台]-&gt;「新增硬體]</p>
<p>2. 按一下 [是，我已連接這個硬體]，然後按一下 [下一步]。</p>
<p>3. 按一下位於清單底部的 [新增硬體裝置]，然後按一下 [下一步]。</p>
<p>4. 按一下 [安裝我從清單中手動選取的硬體]，再按一下 [下一步]。</p>
<p>5. 按一下 [網路介面卡]，再按一下 [下一步]。</p>
<p>6. 在 [製造商] 方塊中，按一下 [Microsoft]。</p>
<p>7. 在 [網路介面卡] 方塊中，按一下 [Microsoft Loopback Adapter]，然後按一下 [下一步]。</p>
<p>8. 按一下 [完成]。</p>
<p>參考</p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal;"></p>
<h1 class="title" style="-webkit-box-sizing: border-box; font-size: 19px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;"><a href="http://support.microsoft.com/kb/839013/zh-tw" target="_blank">如何在 Windows XP 中安裝 Microsoft 迴路介面卡</a></h1>
<p></span></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">1. [控制台]-&gt;「新增硬體]</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">2. 按一下 [是，我已連接這個硬體]，然後按一下 [下一步]。</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">3. 按一下位於清單底部的 [新增硬體裝置]，然後按一下 [下一步]。</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">4. 按一下 [安裝我從清單中手動選取的硬體]，再按一下 [下一步]。</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">5. 按一下 [網路介面卡]，再按一下 [下一步]。</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">6. 在 [製造商] 方塊中，按一下 [Microsoft]。</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">7. 在 [網路介面卡] 方塊中，按一下 [Microsoft Loopback Adapter]，然後按一下 [下一步]。</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">8. 按一下 [完成]</div>

<p><a href="http://feedads.g.doubleclick.net/~a/Tc4EpJLjWKJSLQr039flgaZVI6M/0/da"><img src="http://feedads.g.doubleclick.net/~a/Tc4EpJLjWKJSLQr039flgaZVI6M/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Tc4EpJLjWKJSLQr039flgaZVI6M/1/da"><img src="http://feedads.g.doubleclick.net/~a/Tc4EpJLjWKJSLQr039flgaZVI6M/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Evotalk/~4/5G4TjZ2TJDo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://evotalk.net/blog/2009/12/virtual-network-adapter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://evotalk.net/blog/2009/12/virtual-network-adapter.html</feedburner:origLink></item>
		<item>
		<title>Create PyGtk Programming Environment on Windows</title>
		<link>http://feedproxy.google.com/~r/Evotalk/~3/eqKI2x7PIdc/create-pygtk-env-win32.html</link>
		<comments>http://evotalk.net/blog/2009/11/create-pygtk-env-win32.html#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:03:33 +0000</pubDate>
		<dc:creator>asd</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[程式設計]]></category>

		<guid isPermaLink="false">http://evotalk.net/blog/?p=1279</guid>
		<description><![CDATA[1. 安裝「python-2.5.4」
2. 安裝「PyGtk, PyOpenGL, PyGtkGlExt, PyWin32 all in one installer」
使用 「Glade」拉界面 ，「Pythonwin」  IDE  debug，
]]></description>
			<content:encoded><![CDATA[<p>1. 安裝「<a href="http://www.python.org/ftp/python/2.5.4/python-2.5.4.msi">python-2.5.4</a>」<br />
2. 安裝「<a href="http://www.bonifazi.eu/appunti/gtk_installer.exe">PyGtk, PyOpenGL, PyGtkGlExt, PyWin32 all in one installer</a>」</p>
<p>使用 「Glade」拉界面 ，「Pythonwin」  IDE  debug，</p>

<p><a href="http://feedads.g.doubleclick.net/~a/yKssuIvSJihGDeUNExj2O9jaH10/0/da"><img src="http://feedads.g.doubleclick.net/~a/yKssuIvSJihGDeUNExj2O9jaH10/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/yKssuIvSJihGDeUNExj2O9jaH10/1/da"><img src="http://feedads.g.doubleclick.net/~a/yKssuIvSJihGDeUNExj2O9jaH10/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Evotalk/~4/eqKI2x7PIdc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://evotalk.net/blog/2009/11/create-pygtk-env-win32.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://evotalk.net/blog/2009/11/create-pygtk-env-win32.html</feedburner:origLink></item>
		<item>
		<title>Open Default Application by Extension</title>
		<link>http://feedproxy.google.com/~r/Evotalk/~3/t0CijVLdzy8/open-default-application-by-extension.html</link>
		<comments>http://evotalk.net/blog/2009/11/open-default-application-by-extension.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 03:52:18 +0000</pubDate>
		<dc:creator>asd</dc:creator>
				<category><![CDATA[科技新知]]></category>
		<category><![CDATA[軟體使用]]></category>

		<guid isPermaLink="false">http://evotalk.net/blog/?p=1274</guid>
		<description><![CDATA[在windows下，如果要在console下命令，根據檔名開啟預設的應用程式
start 123.txt   # 開啟預設文字編輯器
start http://www.google.com #開啟預設的瀏覽器
start mailto:admin@123.com //開啟預設的email軟體
若是在linux 下，使用的是gnome
gnome-open 123.txt
gnome-open http://www.google.com
gnome-open mailto:admin@123.com
參考 Open a file from the command line using its default application
]]></description>
			<content:encoded><![CDATA[<p>在windows下，如果要在console下命令，根據檔名開啟預設的應用程式<br />
<span style="color: #0000ff;">start 123.txt   # 開啟預設文字編輯器<br />
start http://www.google.com #開啟預設的瀏覽器<br />
start mailto:admin@123.com //開啟預設的email軟體</span></p>
<p>若是在linux 下，使用的是gnome<br />
<span style="color: #0000ff;">gnome-open 123.txt<br />
gnome-open http://www.google.com<br />
gnome-open mailto:admin@123.com</span></p>
<p>參考 <a href="http://linuxcommando.blogspot.com/2009/05/open-file-from-command-line-using-its.html">Open a file from the command line using its default application</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Ep0ugi-ZJk5LJs_xHdz7dmOF3xY/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ep0ugi-ZJk5LJs_xHdz7dmOF3xY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ep0ugi-ZJk5LJs_xHdz7dmOF3xY/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ep0ugi-ZJk5LJs_xHdz7dmOF3xY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Evotalk/~4/t0CijVLdzy8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://evotalk.net/blog/2009/11/open-default-application-by-extension.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://evotalk.net/blog/2009/11/open-default-application-by-extension.html</feedburner:origLink></item>
		<item>
		<title>Perl Here Document</title>
		<link>http://feedproxy.google.com/~r/Evotalk/~3/Akke0PJFNJM/perl-here-document.html</link>
		<comments>http://evotalk.net/blog/2009/10/perl-here-document.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:01:30 +0000</pubDate>
		<dc:creator>asd</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[程式設計]]></category>

		<guid isPermaLink="false">http://evotalk.net/blog/?p=1272</guid>
		<description><![CDATA[Use Perl here documents to print multiple lines of output
example:
view plain

PERL:




print &#38;lt;&#38;lt;FOO;


Perl offers a convenient way of printing multiple lines of output through an interesting feature known as a "Perl here document".


&#160;


A multiline Perl here document works like this:


&#60;ol&#62;


&#160; &#160; &#60;li&#62;The first line of your command will include the two characters &#60;code&#62;&#38;lt;&#38;lt;&#60;/code&#62; followed by a [...]]]></description>
			<content:encoded><![CDATA[<p>Use Perl here documents to print multiple lines of output<br />
example:</p>
<div class="igBar"><span id="lperl-2"><a href="#" onclick="javascript:showCodeTxt('perl-2'); return false;">view plain</a></span></div>
<div class="shadow">
<div class="syntax_hilite"><span class="langName">PERL:</span>
<div id="perl-2">
<div class="perl">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.perldoc.com/perl5.6/pod/func/print.html"><span style="color: #000066;">print</span></a> &amp;lt;&amp;lt;FOO;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Perl offers a convenient way of printing multiple lines of output through an interesting feature known as a <span style="color: #ff0000;">"Perl here document"</span>.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">A multiline Perl here document works like this:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009999;">&lt;ol&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009999;">&lt;li&gt;</span>The first line of your command will include the two characters <span style="color: #009999;">&lt;code&gt;</span>&amp;lt;&amp;lt;&lt;/code&gt; followed by a <span style="color: #ff0000;">"special"</span> identifier string, followed by a semi-colon. <span style="color: #66cc66;">&#40;</span>For <span style="color: #b1b100;">my</span> example I will <span style="color: #000000; font-weight: bold;">use</span> the identifier string <span style="color: #009999;">&lt;code&gt;</span>FOO&lt;/code&gt;. More on this shortly.<span style="color: #66cc66;">&#41;</span>&lt;/li&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009999;">&lt;li&gt;</span>Next, just enter all of the lines of output that you want to <a href="http://www.perldoc.com/perl5.6/pod/func/print.html"><span style="color: #000066;">print</span></a>.&lt;/li&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009999;">&lt;li&gt;</span>When you are ready to terminate the output, put your special identifier string on a line by itself to end the output.&lt;/li&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/ol&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">FOO </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p>
遇到反斜線需要 double。</p>

<p><a href="http://feedads.g.doubleclick.net/~a/TxSo6bGCKXmOJ695g2SJrKZH2Kw/0/da"><img src="http://feedads.g.doubleclick.net/~a/TxSo6bGCKXmOJ695g2SJrKZH2Kw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/TxSo6bGCKXmOJ695g2SJrKZH2Kw/1/da"><img src="http://feedads.g.doubleclick.net/~a/TxSo6bGCKXmOJ695g2SJrKZH2Kw/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Evotalk/~4/Akke0PJFNJM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://evotalk.net/blog/2009/10/perl-here-document.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://evotalk.net/blog/2009/10/perl-here-document.html</feedburner:origLink></item>
		<item>
		<title>XPath</title>
		<link>http://feedproxy.google.com/~r/Evotalk/~3/UqKhwxP6W1s/xpath.html</link>
		<comments>http://evotalk.net/blog/2009/10/xpath.html#comments</comments>
		<pubDate>Mon, 12 Oct 2009 06:14:05 +0000</pubDate>
		<dc:creator>asd</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[程式設計]]></category>

		<guid isPermaLink="false">http://evotalk.net/blog/?p=1270</guid>
		<description><![CDATA[xml data
view plain

CODE:




&#38;lt;?xml version="1.0" encoding="ISO-8859-1"?&#38;gt;


&#38;lt;catalog&#38;gt;


  &#38;lt;cd country="USA"&#38;gt;


    &#38;lt;title&#38;gt;Empire Burlesque&#38;lt;/title&#38;gt;


    &#38;lt;artist&#38;gt;Bob Dylan&#38;lt;/artist&#38;gt;


    &#38;lt;price&#38;gt;10.90&#38;lt;/price&#38;gt;


  &#38;lt;/cd&#38;gt;


  &#38;lt;cd country="UK"&#38;gt;


    &#38;lt;title&#38;gt;Hide your heart&#38;lt;/title&#38;gt;


    &#38;lt;artist&#38;gt;Bonnie Tyler&#38;lt;/artist&#38;gt;


    &#38;lt;price&#38;gt;10.0&#38;lt;/price&#38;gt;


  &#38;lt;/cd&#38;gt;


  &#38;lt;cd country="USA"&#38;gt;


    &#38;lt;title&#38;gt;Greatest Hits&#38;lt;/title&#38;gt;


    &#38;lt;artist&#38;gt;Dolly Parton&#38;lt;/artist&#38;gt;


    &#38;lt;price&#38;gt;9.90&#38;lt;/price&#38;gt;


  &#38;lt;/cd&#38;gt;


&#38;lt;/catalog&#38;gt; 







XPath expressions



/catalog
selects the root element


/catalog/cd
selects all the cd elements of the catalog element


/catalog/cd/price
selects all the price elements of all the cd elements of the catalog [...]]]></description>
			<content:encoded><![CDATA[<p>xml data</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showCodeTxt('code-4'); return false;">view plain</a></span></div>
<div class="shadow">
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"ISO-8859-1"</span>?&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;catalog&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  &amp;lt;cd country=<span style="color:#CC0000;">"USA"</span>&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;title&amp;gt;Empire Burlesque&amp;lt;/title&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;artist&amp;gt;Bob Dylan&amp;lt;/artist&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;price&amp;gt;<span style="color:#800000;color:#800000;">10</span>.<span style="color:#800000;color:#800000;">90</span>&amp;lt;/price&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  &amp;lt;/cd&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  &amp;lt;cd country=<span style="color:#CC0000;">"UK"</span>&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;title&amp;gt;Hide your heart&amp;lt;/title&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;artist&amp;gt;Bonnie Tyler&amp;lt;/artist&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;price&amp;gt;<span style="color:#800000;color:#800000;">10</span>.<span style="color:#800000;color:#800000;">0</span>&amp;lt;/price&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  &amp;lt;/cd&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  &amp;lt;cd country=<span style="color:#CC0000;">"USA"</span>&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;title&amp;gt;Greatest Hits&amp;lt;/title&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;artist&amp;gt;Dolly Parton&amp;lt;/artist&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    &amp;lt;price&amp;gt;<span style="color:#800000;color:#800000;">9</span>.<span style="color:#800000;color:#800000;">90</span>&amp;lt;/price&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  &amp;lt;/cd&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;/catalog&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p>
XPath expressions</p>
<table id="Table1" style="height: 486px;" border="1" cellspacing="1" cellpadding="1" width="100%">
<tbody>
<tr>
<td width="188"><code lang="text">/catalog</code></td>
<td>selects the root element</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd</code></td>
<td>selects all the <code lang="text">cd</code> elements of the <code lang="text">catalog</code> element</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd/price</code></td>
<td>selects all the price elements of all the <code lang="text">cd</code> elements of the <code lang="text">catalog</code> element</td>
</tr>
<tr>
<td width="188" height="20"><code lang="text">/catalog/cd[price&gt;10.0]</code></td>
<td height="20">selects all the <code lang="text">cd</code> elements with price greater than 10.0</td>
</tr>
<tr>
<td width="188"><code lang="text">starts with a slash(/)</code></td>
<td>represents an absolute path to an element</td>
</tr>
<tr>
<td width="188"><code lang="text">starts with two slashes(//)</code></td>
<td>selects all elements that satisfy the criteria</td>
</tr>
<tr>
<td width="188"><code lang="text">//cd</code></td>
<td>selects all <code lang="text">cd</code> elements in the document</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd/title | /catalog/cd/artist</code></td>
<td>selects all the <code lang="text">title</code> and <code lang="text">artist</code> elements of the <code lang="text">cd</code> elements of <code lang="text">catalog</code></td>
</tr>
<tr>
<td width="188"><code lang="text">//title | //artist</code></td>
<td>selects all the <code lang="text">title</code> and <code lang="text">artist</code> elements in the document</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd/*</code></td>
<td>selects all the child elements of all <code lang="text">cd</code> elements of the <code lang="text">catalog</code> element</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/*/price</code></td>
<td>selects all the price elements that are grandchildren of <code lang="text">catalog</code></td>
</tr>
<tr>
<td width="188"><code lang="text">/*/*/price</code></td>
<td>selects all <code lang="text">price</code> elements which have two ancestors</td>
</tr>
<tr>
<td width="188"><code lang="text">//*</code></td>
<td>selects all elements in the document</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd[1]</code></td>
<td>selects the first <code lang="text">cd</code> child of <code lang="text">catalog</code></td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd[last()]</code></td>
<td>selects the last <code lang="text">cd</code> child of <code lang="text">catalog</code></td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd[price]</code></td>
<td>selects all the <code lang="text">cd</code> elements that have <code lang="text">price</code></td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd[price=10.90]</code></td>
<td>selects <code lang="text">cd</code> elements with the price of 10.90</td>
</tr>
<tr>
<td width="188"><code lang="text">/catalog/cd[price=10.90]/price</code></td>
<td>selects all <code lang="text">price</code> elements with the price of 10.90</td>
</tr>
<tr>
<td width="188"><code lang="text">//@country</code></td>
<td>selects all "<code lang="text">country</code>" attributes</td>
</tr>
<tr>
<td width="188"><code lang="text">//cd[@country]</code></td>
<td>selects <code lang="text">cd</code> elements which have a "<code lang="text">country</code>" attribute</td>
</tr>
<tr>
<td width="188"><code lang="text">//cd[@*]</code></td>
<td>selects <code lang="text">cd</code> elements which have any attribute</td>
</tr>
<tr>
<td width="188"><code lang="text">//cd[@country='UK']</code></td>
<td>selects <code lang="text">cd</code> elements with "<code lang="text">country</code>" attribute equal to 'UK'</td>
</tr>
</tbody>
</table>
<p>reference:<br />
<span id="ctl00_ArticleTopHeader_ArticleTitle"><a href="http://www.codeproject.com/KB/cpp/myXPath.aspx" target="_blank">Manipulate XML data with XPath and XmlDocument (C#)</a><br />
<strong><a href="http://www.zvon.org/xxl/XPathTutorial/General/examples.html" target="_blank">XPath Tutorial</a></strong></span></p>

<p><a href="http://feedads.g.doubleclick.net/~a/vDXLyFfawMAjXD23q4rdzrD2LG4/0/da"><img src="http://feedads.g.doubleclick.net/~a/vDXLyFfawMAjXD23q4rdzrD2LG4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vDXLyFfawMAjXD23q4rdzrD2LG4/1/da"><img src="http://feedads.g.doubleclick.net/~a/vDXLyFfawMAjXD23q4rdzrD2LG4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Evotalk/~4/UqKhwxP6W1s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://evotalk.net/blog/2009/10/xpath.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://evotalk.net/blog/2009/10/xpath.html</feedburner:origLink></item>
	</channel>
</rss>
