title: ELementTree first child function is missing
body: <p>I am writing a parser in python to parse an xml file. For that I need to get tag name but when I am doing so, along with tag name I am getting namespace also. Alongwith this, I need to get the first child at many positions which I am unable to find any attribute in this package (Elementtree). I searched a lot but could not find out as how to get only tag name without namespace value and first child also. The trialinput.xml file is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;nf:rpc-reply xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="http://www.cisco.com/nxos:1.0:ip"&gt;
   &lt;nf:data&gt;
    &lt;show&gt;
     &lt;ip&gt;
      &lt;interface&gt;
       &lt;__XML__BLK_Cmd_ip_show_interface_command_brief&gt;
        &lt;__XML__OPT_Cmd_ip_show_interface_command_operational&gt;
         &lt;__XML__OPT_Cmd_ip_show_interface_command_vrf&gt;
          &lt;__XML__OPT_Cmd_ip_show_interface_command___readonly__&gt;
           &lt;__readonly__&gt;
      &lt;TABLE_intf&gt;
  
          &lt;ROW_intf&gt;
                  &lt;vrf-name-out&gt;default&lt;/vrf-name-out&gt;
                  &lt;intf-name&gt;Vlan10&lt;/intf-name&gt;
                  &lt;prefix&gt;9.1.1.1&lt;/prefix&gt;
                  &lt;ip-disabled&gt;FALSE&lt;/ip-disabled&gt;
                  &lt;iod&gt;104&lt;/iod&gt;
                  &lt;proto-state&gt;TRUE&lt;/proto-state&gt;
                  &lt;link-state&gt;TRUE&lt;/link-state&gt;
                  &lt;admin-state&gt;TRUE&lt;/admin-state&gt;
                 &lt;/ROW_intf&gt;
          &lt;ROW_intf&gt;
                  &lt;vrf-name-out&gt;default&lt;/vrf-name-out&gt;
                  &lt;intf-name&gt;Vlan23&lt;/intf-name&gt;
                  &lt;prefix&gt;23.1.1.9&lt;/prefix&gt;
                  &lt;ip-disabled&gt;FALSE&lt;/ip-disabled&gt;
                  &lt;iod&gt;103&lt;/iod&gt;
                  &lt;proto-state&gt;TRUE&lt;/proto-state&gt;
                  &lt;link-state&gt;TRUE&lt;/link-state&gt;
                  &lt;admin-state&gt;TRUE&lt;/admin-state&gt;
               &lt;/ROW_intf&gt;
               &lt;ROW_intf&gt;
                  &lt;vrf-name-out&gt;default&lt;/vrf-name-out&gt;
                  &lt;intf-name&gt;Po1&lt;/intf-name&gt;
                  &lt;prefix&gt;4.9.1.2&lt;/prefix&gt;
                  &lt;ip-disabled&gt;FALSE&lt;/ip-disabled&gt;
                  &lt;iod&gt;111&lt;/iod&gt;
                  &lt;proto-state&gt;TRUE&lt;/proto-state&gt;
                  &lt;link-state&gt;TRUE&lt;/link-state&gt;
                  &lt;admin-state&gt;TRUE&lt;/admin-state&gt;
               &lt;/ROW_intf&gt;
               &lt;ROW_intf&gt;
                  &lt;vrf-name-out&gt;default&lt;/vrf-name-out&gt;
                  &lt;intf-name&gt;Po2&lt;/intf-name&gt;
                  &lt;prefix&gt;5.9.1.2&lt;/prefix&gt;
                  &lt;ip-disabled&gt;FALSE&lt;/ip-disabled&gt;
                  &lt;iod&gt;112&lt;/iod&gt;
                  &lt;proto-state&gt;TRUE&lt;/proto-state&gt;
                  &lt;link-state&gt;TRUE&lt;/link-state&gt;
                  &lt;admin-state&gt;TRUE&lt;/admin-state&gt;
               &lt;/ROW_intf&gt;
               &lt;ROW_intf&gt;
                  &lt;vrf-name-out&gt;default&lt;/vrf-name-out&gt;
                  &lt;intf-name&gt;Po3&lt;/intf-name&gt;
                  &lt;prefix&gt;6.9.1.2&lt;/prefix&gt;
                  &lt;ip-disabled&gt;FALSE&lt;/ip-disabled&gt;
                  &lt;iod&gt;113&lt;/iod&gt;
                  &lt;proto-state&gt;TRUE&lt;/proto-state&gt;
                  &lt;link-state&gt;TRUE&lt;/link-state&gt;
                  &lt;admin-state&gt;TRUE&lt;/admin-state&gt;
               &lt;/ROW_intf&gt;
      &lt;/TABLE_intf&gt;
      &lt;/__readonly__&gt;
          &lt;/__XML__OPT_Cmd_ip_show_interface_command___readonly__&gt;
         &lt;/__XML__OPT_Cmd_ip_show_interface_command_vrf&gt;
        &lt;/__XML__OPT_Cmd_ip_show_interface_command_operational&gt;
       &lt;/__XML__BLK_Cmd_ip_show_interface_command_brief&gt;
      &lt;/interface&gt;
     &lt;/ip&gt;
    &lt;/show&gt;
   &lt;/nf:data&gt;
  &lt;/nf:rpc-reply&gt;
  </code></pre>
  
  <p>The code that I am writing is (in progress of completion, has given just to give a gist of what I am trying to get as an output):</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  
  print "before skip()"
  def skip(root):
  
      print "rootname.tag in skip == %s" %(root.tag)
          if(root.tag == "readonly"):  // here if I compare with the namespace then returns the value
          print "skip -&gt; if"
          return root
      else:
          print "skip-&gt; else"
          root = root[0]
          print "new root %s" %root
          return skip(root)
  
  xmlDoc = ET.parse("trialinput.xml")  
  dict = {}
  print "accessing the root"
  root = xmlDoc.getroot()
  
  print "rootname == %s" %root.tag
  pointerOfReadonly = skip(root)
  
  print "pointerOfReadonly.tag %s" %pointerOfReadonly.tag
  
  print "accessing child of readonly"
  tableInitiationPointer = pointerOfReadonly[0]   // Here how to get the first child of readonly tag?
  
  
  #print "accessing children of table"
  #allRows = tableInitiationPointer.childNodes
  
  Print "no of rows in the table = %s" %tableInitiationPointer.len("ROW_intf")// Returning none due to above non ability to find the tag
  for row in tableInitiationPointer:
      for subrows in row:
          key = subrows.tag
          value = subrows.value
                  dict[key]=value
  </code></pre>