Hello again,<br><br>I think I found a way to accomplish my goal with minidom.&nbsp; Is this the most direct solution for my goal, or is there a simpler way?&nbsp; Thanks again.<br><br>import xml.dom.minidom<br><br>document = '&lt;user first=&quot;jean&quot; last=&quot;valjean&quot; dob=&quot;17290101&quot; children=&quot;1&quot; hobby=&quot;stealing bread&quot; /&gt;'
<br><br>dom = xml.dom.minidom.parseString(document)<br><br>t = dom.getElementsByTagName(&quot;user&quot;)[0]<br><br>if t.hasAttributes():<br>&nbsp;&nbsp;&nbsp; for cnt in range(0, t.attributes.length):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if t.attributes.item(cnt).nodeName == &quot;hobby&quot;:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 'hobby = ' + t.attributes.item(cnt).nodeValue<br><br><div><span class="gmail_quote">On 12/23/05, <b class="gmail_sendername">Michael Gilbert</b> &lt;<a href="mailto:michael.s.gilbert@gmail.com">michael.s.gilbert@gmail.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello all,<br><br>I appologize for positing such a trivial question, but I am having trouble decrypting the python XML documentation.
<br><br>I am parsing a relatively simple strings, each of which consist of a single xml tag.&nbsp; For example:
<br><br>&lt;user first=&quot;jean&quot; last=&quot;valjean&quot; dob=&quot;17290101&quot; children=&quot;1&quot; hobby=&quot;stealing bread&quot; /&gt;<br><br>What is the best way to determine only the user's hobby?&nbsp; pulldom, sax, something else?&nbsp; is there guidance on using xml tools for single tags?&nbsp; This is what I have so far
<br><br>&nbsp; from xml.dom.pulldom import *<br>&nbsp; a = parseString('&lt;user first=&quot;jean&quot; last=&quot;valjean&quot; dob=&quot;17290101&quot; children=&quot;1&quot; hobby=&quot;stealing bread&quot; /&gt;')<br><br>I've tried getEvent() and expandNode(), but am not getting any closer to accessing the content in the string.&nbsp; What are your suggestions on the best way to retrieve the hobby?&nbsp; Thank you very much any help.
<br><br>Hope you all have a happy holiday,<br>Mike Gilbert<br><br>

</blockquote></div><br>