Hello all.i have a quite big task, but i have a feeling it could be easily solved using python. The thing is, i need to export the whole company DB(Postgresql) to an XML template provided by another company. the template looks like this(just a fragment) :
?xml version="1.0" encoding="utf-8"?> <PropertyDetailsRS> <Hotel> <AgencyId /> <AgencyCode /> <GiataCode /> <Name /> <Descriptions> <Description Lang="DE"> <Common /> <ShortDescription /> <LongDescription /> <Miscellaneous /> <Location /> <Interieur /> <ImportantRemark /> </Description> </Descriptions> <Category /> <Country /> <Region /> <City /> <Zip /> <Address /> <AdditionalAddress /> <Telephone /> <Fax /> <Email /> <Url /> <DestinationAirports> <IataCode Code="BKK" /> </DestinationAirports> </Hotel> <RoomList> <RoomGroup Id="" Code="" SeaView="" EN="" DE=""> <RoomDescriptions> <RoomDescription Lang=""> <Description /> </RoomDescription> </RoomDescriptions> </RoomGroup> </RoomList> <BoardList> <Board Id="" Code="" EN="" DE="" /> </BoardList> ... i've never done anything like that.i'm familiar with psycopg2 module, also, i'm familiar with xml parsing(ElementTree, lxml). is there some way to use the provided xml as a template, then parse all the data according to the template, what is the moyt pythonic way to do this? Thx.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor