xml question
Martin v. Löwis
loewis at informatik.hu-berlin.de
Tue Sep 3 12:28:26 EDT 2002
Eric Texier <erict at millfilm.co.uk> writes:
> From Disk: (unicode)
> N1 [(None, u'fileName'), (None, u'OutputType'), (None, u'name'), (None,
> u'UId'), (None, u'version'), (None, u'node')]
> From Memory:
> N2 ['node', 'version', 'UId', 'fileName', 'OutputType', 'name']
>
> What will be the simplest thing to do in this case?
It appears that when parsing from disk, you have used a
namespace-aware mode, and when building the document from memory, you
use a namespace-unaware mode.
I recommend to use the same mode of operation for both cases. To get
namespace-unaware parsing from disk, assuming you use minidom.parse,
you should create a SAX parser that has the namespaces feature turned
off.
HTH,
Martin
More information about the Python-list
mailing list