fork(1) download
  1. from xml.etree import ElementTree as et
  2. xml = '''\
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  5. <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Protected_Debug|Win32'">
  6. <RunCodeAnalysis>false</RunCodeAnalysis>
  7. </PropertyGroup>
  8. </Project>
  9. '''
  10. et.register_namespace('', "http://schemas.microsoft.com/developer/msbuild/2003")
  11. tree = et.ElementTree(et.fromstring(xml))
  12. print(tree.find('.//RunCodeAnalysis'))
  13.  
Success #stdin #stdout 0.04s 9980KB
stdin
Standard input is empty
stdout
<Element '{http://schemas.microsoft.com/developer/msbuild/2003}RunCodeAnalysis' at 0x2ad063b0d818>