Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'root': 0.05; 'element': 0.07; 'nested': 0.07; 'assuming': 0.09; 'subject:xml': 0.09; 'caveat': 0.16; 'element.': 0.16; 'received:172.18.0': 0.16; 'elements': 0.16; 'thanks,': 0.17; '8bit%:5': 0.22; 'to:name :python-list@python.org': 0.22; 'this?': 0.23; 'header:Received:8': 0.24; 'facility': 0.31; 'libraries': 0.31; 'subject:with': 0.35; 'skip:u 20': 0.35; 'there': 0.35; 'located': 0.36; 'doing': 0.36; 'project': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'manually': 0.60; 'received:unknown': 0.61 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=W0/jygPWOP4vNGB1giqMd6hViTlTWopR5z2gXdBWnF4= c=1 sm=1 a=7PYXob_7ZXMA:10 a=P90J6pEA2ccA:10 a=BLceEmwcHowA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=g3mLq75WYuDrh3Lt0JSDww==:17 a=LBufqGs9RTWpJjhihUIA:9 a=wPNLvfGTeEIA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=activenetwerx.com; s=default; t=1413578104; bh=mPf6wCZUBhoaBW6XDjp5FsIf561pX0e0Gyg365Ibjtc=; h=From:To:Subject:Date; b=GfhgbYS3tVqF0l9PXA/kiSjdJsvZO+F6zlWYtvyEx0tudFPH729aWWZPCYNq9nKLw mWomG0xp+i9jUv3ZsF7x6iU/7jatXhDRyeWUKtcFIwrxeB8scyDtZSZN40lRmkYxkR BOhda2JYxZVkTVrmV+MmRcSqrKSDQ1+iOxJA4CfM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=activenetwerx.com; s=default; t=1413578104; bh=mPf6wCZUBhoaBW6XDjp5FsIf561pX0e0Gyg365Ibjtc=; h=From:To:Subject:Date; b=GfhgbYS3tVqF0l9PXA/kiSjdJsvZO+F6zlWYtvyEx0tudFPH729aWWZPCYNq9nKLw mWomG0xp+i9jUv3ZsF7x6iU/7jatXhDRyeWUKtcFIwrxeB8scyDtZSZN40lRmkYxkR BOhda2JYxZVkTVrmV+MmRcSqrKSDQ1+iOxJA4CfM= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.activenetwerx.com X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 From: "Joseph L. Casale" To: "python-list@python.org" Subject: Processing xml for output with cElementTree Thread-Topic: Processing xml for output with cElementTree Thread-Index: AQHP6kkyCNfmU9V+r0mwvnrgYBUOZQ== Date: Fri, 17 Oct 2014 20:35:02 +0000 Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.18.0.4] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413578176 news.xs4all.nl 2913 [2001:888:2000:d::a6]:36808 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79252 I am unfortunately=A0unable to use lxml for a project and must resort to ba= se only libraries=0A= to create several nested elements located directly under a root element. Th= e caveat is the=0A= incremental writing and flushing of the nested elements as they are created= .=0A= =0A= So assuming the structure is texttext if I woul= d like to=0A= manually deconstruct this in order to write each element in order of appear= ance, is there=0A= any built in facility for this?=0A= =0A= The way I am currently doing is rather pathetic...=0A= =0A= Thanks,=0A= jlc=0A=