1
我有格式的XML:如何打印物化元素?
<channel>
<games>
<game slot='1'>
<id>Bric A Bloc</id>
<title-text>BricABloc Hoorah</title-text>
<link>Fruit Splat</link>
</game>
</games>
</channel>
我解析使用lxml.objectify
这个XML,通过:
tree = objectify.parse(file)
有将有可能成为下<games>
一些<game>
秒。 我明白,我可以生成通过<game>
对象的列表:
[ tree.games[0].game[0:4] ]
我的问题是,什么类是那些对象,并在那里打印的任何种类的这些对象属于任何对象的功能?