import lxml.etree
import lxml.builder
E = lxml.builder.ElementMaker()
ROOT = E.root
DOC = E.doc
intent = E.intent
sender = E.sender
action = E.action
intentname = E.intentname
the_doc = ROOT( 
DOC(intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.POWER_USAGE_SUMMARY"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.about.About'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.free.tools.AdWhirlCustomBuyPro'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.about.About'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.POWER_USAGE_SUMMARY"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.reviewpopup.ReviewPopupActivity'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBoxShare'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.POWER_USAGE_SUMMARY"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.reviewpopup.ReviewPopupActivity'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.about.About'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.free.tools.AdWhirlCustomBuyPro'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.reviewpopup.ReviewPopupActivity'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.about.About'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.free.tools.AdWhirlCustomBuyPro'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBoxShare'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBoxShare'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.reviewpopup.ReviewPopupActivity'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBoxShare'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.aboutbox.AboutBox'),
action('"android.intent.action.VIEW"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.battery.core.Settings'),
action('"android.intent.action.POWER_USAGE_SUMMARY"'),
),
intent(
intentname('ch.smalltech.battery.free'),
sender('ch.smalltech.common.free.tools.AdWhirlCustomBuyPro'),
action('"android.intent.action.VIEW"'),
),
)
)
print lxml.etree.tostring(the_doc, pretty_print=True)
# Open a file
fo = open('intent.txt', 'wb')
fo.write( lxml.etree.tostring(the_doc, pretty_print=True));
# Close opend file
fo.close()
