
Hi all! I have a bit of XML which I want to parse via lxml.objectify. from lxml import objectify node = objectify.fromstring(''' <Item> <ASIN>0747532745</ASIN> <ItemAttributes> <Author>Joanne K. Rowling</Author> <Manufacturer>Bloomsbury Publishing</Manufacturer> <ProductGroup>Book</ProductGroup> <Title>Harry Potter and the Philosopher's Stone</Title> </ItemAttributes> </Item> ''') I have the following problem: node.ASIN is evaluated to integer value 747532745 but should be a string ('0747532745'). There is no way for me to influence the incoming XML, so any py:pytype magic or adding a schema is out of the question. Is there a way to ensure that ASIN elements are always evaluated to a string? Cheers, Seb. -- Sebastian Rahlf basti@redtoad.de