Questions tagged [pyxb]

PyXB (“pixbee”) is a pure Python package that generates Python source code for classes that correspond to data structures defined by XMLSchema.

PyXB (“pixbee”) is a pure Python package that generates Python source code for classes that correspond to data structures defined by XMLSchema.

Docs: https://pabigot.github.io/pyxb/
Development repository: https://github.com/pabigot/pyxb

On Apr 11, 2018 the author announced End-Of-Life.

There is a little bit more update fork at https://github.com/jonfoster/pyxb. See also actively developing alternative generateDS.

56 questions
0
votes
1 answer

Suitable 'Union' member type not correctly recognized when parsing XML

I have been provided with an XSD with the following definition of the type AnySimple (I do not know why this type has been defined, but in any case it is distinct from xsd:anySimpleType):
Silverspur
  • 891
  • 1
  • 12
  • 33
0
votes
1 answer

PyXB XML Object to String

Given a PyXB object, how can one turn it into a string? I used PyXB to generate an XML document, which I would like to then turn into a dictionary using the xmltodict module. The issue is that xmltodict.parse takes a bytes-like object, which the…
Thomas
  • 720
  • 9
  • 22
0
votes
1 answer

Pyxb wrongly recognises simple type

I am having problem with pyxb once building xml on the base of schema biddings. I found out that depending on the method of assingning value to some simple ('An atomic simple type') element i get different type assigned. Here is what i mean i…
modzello86
  • 433
  • 7
  • 16
0
votes
1 answer

How to remove 'ns1' prefix with PyXB or JaXB?

From this xsd file:
nowox
  • 25,978
  • 39
  • 143
  • 293
0
votes
1 answer

PyXB: Cannot instantiate abstract type

I try to do my first steps with PyXB but have the problem, that I cannot create the element paket. I have gone through the samples but can't find any more information on how to handle this. If the abstract element is one level deeper there seems a…
MAGYS
  • 181
  • 1
  • 14
0
votes
2 answers

Addition transactionSettings to a request object on Authorize.net (using sdk-python)

I am using Authorize.net's native python sdk. In their API documentation, it shows that you can nest a setting as follows: transactionSettings setting settingName settingValue I have setup a ARBCreateSubscriptionRequest object,…
Adam Hopkins
  • 6,837
  • 6
  • 32
  • 52
0
votes
1 answer

PyXB module not recognised

I have installed pyxb module regular way (python setup.py install) and here is the output: Found bundle in pyxb/bundles/common Found bundle in pyxb/bundles/dc Found bundle in pyxb/bundles/wssplat Found bundle in pyxb/bundles/saml20 running…
gudrun
  • 11
  • 2
0
votes
1 answer

python pyxb: Creating xml with complex embedded type

I'm having a xsd file and need to create an xml accordingly.
Jochen
  • 155
  • 1
  • 3
  • 15
0
votes
1 answer

Pyxb generating multiple complex types in a loop

I have a data structure where values of a certain complex type (let's call it myComplexType) are stored in a list. myComplexType is under another complex type (called complexType1) which is under the "root" i.e (RootName -> complexType1 ->…
Mike Issa
  • 295
  • 2
  • 13
0
votes
2 answers

Parsing a subnode with PyXB

Using PyXB, I'd like to serialize a sub node and then be able to parse it back. The naive way isn't working, because the sub node is not a valid root element according to the schema. My schema:
Gavin Wahl
  • 1,193
  • 8
  • 21
0
votes
1 answer

How to avoid the creation of anonymous classes in pyxb when using xsd file

I'm trying to implement a connection to some API. During the communication I get as payload xml code. They provide a .xsd-file with the xml description. Now I want to parse the xml string and get the appropriate class in return. This functionality…
Jochen
  • 155
  • 1
  • 3
  • 15
0
votes
1 answer

Creating a namespace dictionary from pyxb binding?

Is there a way to create a dictionary of namespaces from a pyxb binding class?
BLevy
  • 61
  • 5
0
votes
1 answer

how to set an inner nillable element to null

I am trying to set an inner nillable element called nbReports to null and so far I have failed. A snapshot of the XSD file and the code is next:
malika
  • 1
0
votes
1 answer

pyxb issues with assigning vlaues to anunbound inner complex element with known type

I am trying to assign values to an unbound inner element of a predefined type but I am not able to validate it. here is my example with reports.xsd and the snippet of the code that is not working: ...
malika
  • 1
0
votes
1 answer

DOMGenerationError: Binding value inconsistent with content model

While constructing xml using pyxb module, I am getting the error as "DOMGenerationError: Binding value inconsistent with content model". Is it possible to know what is the exact error message causing above problem?
Rajesh Kumar
  • 1,270
  • 4
  • 15
  • 31