Thanks for the sample. I'll look into this as soon as I find the time.
Update: Your sample code is setting a class attribute (Myfile.isread) instead of an instance attribute (self.isread). Since class attributes are shared between all instances of a class, the second Myfile instance will always return an empty string -- which causes the second parser to raise a "ParseError: no element found" exception. If I fix that, both parsers successfully parse that XML snippet.
Thanks for the sample. I'll look into this as soon as I find the time.
Update: Your sample code is setting a class attribute (Myfile.isread) instead of an instance attribute (self.isread). Since class attributes are shared between all instances of a class, the second Myfile instance will always return an empty string -- which causes the second parser to raise a "ParseError: no element found" exception. If I fix that, both parsers successfully parse that XML snippet.
Opps, you are right. I have originally used it in the running system. And cutted some XML away. I will check again.