<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Extract GPS from Kismet log with ElementTree</title>
	<atom:link href="http://www.larsen-b.com/Article/204.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com/Article/204.html</link>
	<description>Titanium Exposé</description>
	<pubDate>Fri, 21 Nov 2008 10:05:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Fredrik</title>
		<link>http://www.larsen-b.com/Article/204.html#comment-484</link>
		<dc:creator>Fredrik</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-484</guid>
		<description>Possible tweaks:&lt;br /&gt;
&lt;br /&gt;
- use ElementTree.parse to read the file (but this returns an ElementTree wrapper, not an Element; use getroot() to get the root element, or use findall() to pick out the right kind of subnodes).&lt;br /&gt;
&lt;br /&gt;
- getchildren() is deprecated; to get all subelements, just loop over the parent container (i.e. "for node in detection" instead of "for node in detection.getchildren()")&lt;br /&gt;
&lt;br /&gt;
- node.find(tag).text can be written as node.findtext(tag) (however, the latter returns None if no matching element could be found, the former raises an AttributeError exception).&lt;br /&gt;
&lt;br /&gt;
- you can use path syntax to pick out text from subelements (e.g. node.findtext("gps-info/max-lon") should work).&#160; this is probably slower if you need more than a few subelement texts, though.&lt;br /&gt;
&lt;br /&gt;
Cheers /F</description>
		<content:encoded><![CDATA[<p>Possible tweaks:</p>
<p>- use ElementTree.parse to read the file (but this returns an ElementTree wrapper, not an Element; use getroot() to get the root element, or use findall() to pick out the right kind of subnodes).</p>
<p>- getchildren() is deprecated; to get all subelements, just loop over the parent container (i.e. &#8220;for node in detection&#8221; instead of &#8220;for node in detection.getchildren()&#8221;)</p>
<p>- node.find(tag).text can be written as node.findtext(tag) (however, the latter returns None if no matching element could be found, the former raises an AttributeError exception).</p>
<p>- you can use path syntax to pick out text from subelements (e.g. node.findtext(&#8221;gps-info/max-lon&#8221;) should work).&nbsp; this is probably slower if you need more than a few subelement texts, though.</p>
<p>Cheers /F</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jkx</title>
		<link>http://www.larsen-b.com/Article/204.html#comment-485</link>
		<dc:creator>Jkx</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-485</guid>
		<description>&lt;p&gt;Thanks for this comment, Fredrick, I now wondering how to merge 2 Elementree, or choose the best element in a node I gonna read the doc.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for this comment, Fredrick, I now wondering how to merge 2 Elementree, or choose the best element in a node I gonna read the doc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
