zoukankan      html  css  js  c++  java
  • PyXB: Python XML Schema Bindings

    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

  • 相关阅读:
    meta标签中的http-equiv属性使用介绍
    MySQL中批量执行SQL语句
    <fmt:formatNumber/>显示不同地区的各种数据格式
    <fmt:setBundle/>标签
    <fmt:bundle/>、<fmt:message/>、<fmt:param/>资源国际化
    <fmt:setTimeZone/>设置时区
    <fmt:timeZone/>显示全球时间
    初识Storm
    storm安装及启动
    HBase API 的使用(一)
  • 原文地址:https://www.cnblogs.com/rgqancy/p/9754327.html
Copyright © 2011-2022 走看看