用于transmorifier管道的简单xml读取器
transmogrify.xmlsource的Python项目详细描述
一个简单的transmorgifer蓝图,用于读取表单的xml文件
<container> <item> <field1>value</field1> <field2>value</field2> ... </item> ... </container>
示例
下面的示例使用漏斗web和ploneremote上载 命令行中XML文件中的内容
首先创建一个自定义的pipeline.cfg
现在使用buildout.cfg安装漏斗web
引导 现在运行您的自定义转换器 转换器解析xml并通过xmlrpc上传到plone。或
构建自己的管道以将内容转换为任何内容或任何位置。[transmogrifier]
pipeline =
xmlsource
ploneupload
ploneupdate
[xmlsource]
blueprint = transmogrify.xmlsource
xmlfile = items.xml
pathtag = field1
itemtag = item
type = MyCustomType
[ploneupload]
blueprint = transmogrify.ploneremote.remoteconstructor
target = http://admin:admin@localhost/Plone/mycontent
[ploneupdate]
blueprint = transmogrify.ploneremote.remoteschemaupdater
target = ${ploneupload:target}
[buildout]
parts = convertxml
[convertxml]
recipe = funnelweb
pipeline=wynhotels.cfg
eggs = transmogrify.xmlsource
$> easy_install zc.buildout
$> buildout init
$> bin/buildout
$> bin/convertxml