http://pyxb.sourceforge.net/

PyXB (“pixbee”) is a pure Python package that generates Python source code for classes that correspond to data structures defined by XMLSchema. The generated classes support bi-directional conversion between XML documents and Python objects. In concept it is similar to JAXB for Java and CodeSynthesis XSD for C++. A Thirty Second Example is at the bottom of this page. Step-by-step examples are in User Reference.

Thirty Second Example

An example of a program using PyXB to interact with a web service [*] using an automatically-generated module. First, retrieve the WSDL and generate the bindings:

llc[566]$ pyxbgen \
--wsdl-location=http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL \
--module=weather \
--write-for-customization
Retrieving WSDL from http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL
WARNING:pyxb.binding.basis:Unable to convert DOM node {http://www.w3.org/2001/XMLSchema}schema at Weather.asmx?WSDL[4:4] to binding
PS urn:uuid:8292a36c-577f-11e4-b592-c8600024e903
WARNING:pyxb.binding.generate:Complex type {http://ws.cdyne.com/WeatherWS/}ArrayOfWeatherDescription renamed to ArrayOfWeatherDescription_
WARNING:pyxb.binding.generate:Complex type {http://ws.cdyne.com/WeatherWS/}ForecastReturn renamed to ForecastReturn_
WARNING:pyxb.binding.generate:Complex type {http://ws.cdyne.com/WeatherWS/}WeatherReturn renamed to WeatherReturn_
Python for http://ws.cdyne.com/WeatherWS/ requires 1 modules

xmlschema · PyPI
https://pypi.org/project/xmlschema/

xml - How to convert XSD to Python Class - Stack Overflow
https://stackoverflow.com/questions/1072853/how-to-convert-xsd-to-python-class

Python 利用 XSD 文件,解析 XML 文件 - hchaoh的博客 - CSDN博客
https://blog.csdn.net/hchaoh/article/details/69390487

PyXB: Python XML Schema Bindings的更多相关文章

  1. XML Schema and XMLspy notes

    Introduction An xml documents consists of elements, attributes and text. There are two structures in ...

  2. XSD(XML Schema Definition)用法实例介绍以及C#使用xsd文件验证XML格式

    XML Schema 语言也称作 XML Schema 定义(XML Schema Definition,XSD),作用是定义 XML 文档的合法构建模块,类似 DTD,但更加强大. 作用有: ①定义 ...

  3. XML Schema命名空间解析

    URI Web中汇集了各种资源.资源可以是具有标识的任何事物, 如文档. 文件. 菜单项. 计算机. 服务等, 甚至可以包括人. 组织和概念[BernersLee 1998].在Web体系结构中, ...

  4. 【转】XSD (xml Schema Definition)

    来自:http://www.cnblogs.com/newsouls/archive/2011/10/28/2227765.html Xml Schema的用途 1.  定义一个Xml文档中都有什么元 ...

  5. Python XML解析(转载)

    Python XML解析 什么是XML? XML 指可扩展标记语言(eXtensible Markup Language). 你可以通过本站学习XML教程 XML 被设计用来传输和存储数据. XML是 ...

  6. C#与XML Schema的问题

    http://bbs.csdn.net/topics/50493564 weileily: 用XmlSchema.Read方法读取了一个xsd文件,请问如何遍历检索器中的ComplexType与Sim ...

  7. XML Schema的基本语法(转)

    XML Schema的基本语法(转) XSDL(XML Schema定义语言)由元素.属性.命名空间和XML文档种的其他节点构成的. 一.XSD中的元素 XSD文档至少要包含:schema根元素和XM ...

  8. Xml Schema:C#访问在complextype中插入新元素

    最近用c#写Xml Schema代码,找了很久也找不到如何在已有的complextype中插入新的element,最后我充分发挥自己的聪明才智,哈哈,终于从...中找到了灵感. XmlSchemaSe ...

  9. [BTS] System.Xml.Schema.XmlSchemaException: The complexType has already been declared when generate IDoc schema.

    I use wcf-sap adapter for generate the schema of IDoc that named "YHREMPMASTER". but throw ...

随机推荐

  1. luogu P3293 [SCOI2016]美味

    题目描述 一家餐厅有 n 道菜,编号 1...n ,大家对第 i 道菜的评价值为 ai(1<=i<=n).有 m 位顾客,第 i 位顾客的期望值为 bi,而他的偏好值为 xi .因此,第 ...

  2. jquery clone

    clone([Even[,deepEven]]) 概述 克隆匹配的DOM元素并且选中这些克隆的副本. 在想把DOM文档中元素的副本添加到其他位置时这个函数非常有用. 参数 EventsBooleanV ...

  3. python代码在linux服务器一般的开头

    #!/usr/bin/env python # -*- coding: utf- -*- 只做备份

  4. MATLAB:控制系统模型变换

    1.多项式转换为零极点 [z,p,k]=tf2zp(num,den); 2.零极点转换为多项式 [num,den]=zp2tf(z,p,k); 3.状态空间转换成多项式传递函数 [num,den]=s ...

  5. python基础学习第四天

    #字符串到数字 可以进行各种进制转换#print(int('11111',8)) #需求 对字符串中的单词翻转 保留空格#第一种方法 最笨clstr='I love you!'bam=clstr.sp ...

  6. 【Codeforces 464D】World of Darkraft - 2

    Codeforces 464 D 首先我们知道这K个装备是互不干扰的,就是说如果一个装备升级了或者卖掉了,不会对其它装备的挣到的钱产生任何影响.所以我们就考虑单独处理某一个装备挣到的钱. 那么就设\( ...

  7. 在 Virtual Box 安装 Mac Os 并安装 Qt 开发应用

    导读 由于 Beslyric-for-X 项目开发需要,开始尝试在 Mac Os 下开发 Qt 应用.尝试成功后,记录于此,希望对有类似需求的人有所帮助. 本文以开发 Beslyric-for-X 为 ...

  8. Zephyr学习专题

    1 前言 本来想学习Zyphyr的Power Management,但是看着看着就被带进去了. 你看功耗,里面的suspend涉及到时间补偿相关的吧,然后就涉及到了Kernel Clocks/Time ...

  9. Linux上vim编辑器缩进的设置(方便如书写python代码)

    因为刚刚安装了Ubuntu虚拟机,知乎大神推荐用VIM编辑器,然后发现在Python缩进上不方便,查了点资料,整理出来,以便自己以后忘了还可以再看看. 第一步: 打开终端,在终端上输入 vim ~/. ...

  10. 【vue】chrome已安装Vue Devtools在控制台却无显示

    chrome已安装Vue Devtools在控制台却无显示的解决: 在点亮Vue Devtools图标后,控制台没有vue解读显示. 原因:脚手架配置NODE_ENV直接定义为了production版 ...