myLib.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:INCWO_auto_synchr 作者: vaelastrazs 项目源码 文件源码
def prepare_xml_product(product_infos):
    xml_data="<customer_product>\
            <is_active>1</is_active>\
            <is_from_vendor>0</is_from_vendor>\
            <currency_id>58</currency_id>\
            <vat_id>607</vat_id>\
            <activity_classification_choice>commerce</activity_classification_choice>\
            <type_of_product_id>20004</type_of_product_id>"

    for tag, value in product_infos.iteritems():
        if tag in INCWO_PARAMS:
            xml_data+="<"+tag+">"+str(value).replace("& ","&amp; ")+"</"+tag+">"
            # log.debug("xml info of product : tag {}, value {} ".format(tag, value))
    xml_data+="</customer_product>"

    return xml_data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号