Re: insert method in ElementTree

2006-07-16 Thread Carl Banks
[EMAIL PROTECTED] wrote: > My request for advice is this: instead of creating a second XML > document that represents the output, would it be possible to expand the > input XML document as needed? I was thinking that the program could > iterate through all the elements. As it is iterating, it wo

Re: insert method in ElementTree

2006-07-16 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > Where I'm struggling is figuring out what the index argument should > be in the insert method. Using the example above > > # assume rootElement is the root of the input XML > xList = rootElement.getiterator() > idx = 0 > for x in xList: > # mix of pseudo-code and

insert method in ElementTree

2006-07-16 Thread mirandacascade
O/S: Win2K Vsn of Python: 2.4 Example: text for c text for d text for f text for g> text for i text for k text for l text for m Python script reads XML document above into ElementTree. The script outputs an XML document that is ba