我想写下面的lxml etree子元素:
<ElementProtocolat0x3803048>,
<ElementStudyEventDefat0x3803108>,
<ElementFormDefat0x3803248>,
<ElementItemGroupDefat0x38032c8>,
<ElementClinicalDataat0x3803408>,
<ElementItemGroupDataat0x38035c8>,
<ElementFormDefat0x38036c8>,
以预定义的顺序将其转换为odm xml文件。i、 e
^{pr2}$是否有任何方法可以对元素进行排序,即使用预定义的列表?在
predefined_order = ['Protocol', 'StudyEventDef','FormDef','ItemGroupDef','ItemDef','CodeList']
此示例演示:
样本输入: 在
^{pr2}$输出: 在
很抱歉,我缺乏xml方面的知识,但我试图仅使用Python的基本知识按排序顺序格式化数据。在
输出:
^{pr2}$相关问题 更多 >
编程相关推荐