Activity for PyXB: Python XML Schema Bindings

  • Hureau Hureau modified a comment on discussion Help

    Hi, first thank to read this I try to convert xsd file in python module via PyXBgen. For CEBDBlock.xsd (attachment) I write : python pyxbgen -u CEBDBlock.xsd -m CEBDBlock But PyXBgen send me an error, it didn't find the URL. I tried to debug and i found that PyXBgen searchs in the current directory and not in internet. To overcome this issue, I put the xmldsig-core-schema.xsd in the same directory than CEBDBlock. With this way the first step seems to work (why have I to do this ?) After this I code...

  • Hureau Hureau posted a comment on discussion Help

    Hi, first thank to read this I try to convert xsd file in python module via PyXBgen. For CEBDBlock.xsd (attachment) I write : python pyxbgen -u CEBDBlock.xsd -m CEBDBlock But PyXBgen send me an error, it didn't find the URL. I tried to debug and i found that PyXBgen searchs in the current directory and not in internet. To overcome this issue, I put the xmldsig-core-schema.xsd in the same directory than CEBDBlock. With this way the first step seems to work (why have I to do this ?) After this I code...

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    I was wondering if it is possible to assign value to Target using pyxb.BIND or some thing similar by creating a temporary XML object.

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    It works with the attached code. However I would like to know if it possible to XML can have selected attributes pinted. With the attachecd code xml looks like: <location xmlns:ns2="http://www.nokia.com/SURE/Location" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.nokia.com/SURE/CommonModel"> <ns1:surename>locationSureName</ns1:surename> <ns1:type>INFRASTRUCTURE</ns1:type> <ns2:latitude>234.23</ns2:latitude> <ns2:longitude>123.12</ns2:longitude> <ns2:associations> <ns2:association>...

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    It works with the attached code. However I would like to know if it possible to XML can have selected attributes pinted. With the attachecd code xml looks like: <location xmlns:ns2="http://www.nokia.com/SURE/Location" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.nokia.com/SURE/CommonModel"> <ns1:surename>locationSureName</ns1:surename> <ns1:type>INFRASTRUCTURE</ns1:type> <ns2:latitude>234.23</ns2:latitude> <ns2:longitude>123.12</ns2:longitude> <ns2:associations> <ns2:association>...

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    Need some help here on how to assign value to abstract type.

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    I think there is some issue with schema the way abstract is used, working on fixing it.

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    Attaching the schema where Target type is defined as abstract type in CommonSUREModelTypes.xsd and is being used in Location.xsd. Lets say I want to assign Target to another instance to Location. Attaching xsd and python example code. The excetpion I get is pyxb.exceptions_.SimplePluralValueError: Type {http://www.nokia.com/SURE/CommonModel}Target cannot be created from {http://www.nokia.com/SURE/Location}Location: <com.nokia.oss.sure.location.location_ object="" at="" 0x000001b0f8b3b4e0=""></co...

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    Attaching the schema where Target type is defined as abstract type in CommonSUREModelTypes.xsd and is being used in Location.xsd. Lets say I want to assign Target to another instance to Location. Attaching xsd and python example code

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    Attaching the schema where Target type is defined as abstract type in CommonSUREModelTypes.xsd and is being used in Location.xsd. Lets say I want to assign Target to another instance to Location. Attaching xsd and python example code

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    Attaching the schema where Target type is defined as abstract type in CommonSUREModelTypes.xsd and is being used in Location.xsd. Lets say I want to assign Target to another instance to Location. Attaching xsd and python example code

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    I am trying to access one of the element from complex type and running into 'AttributeError: '_PluralBinding' object has no attribute' Attaching the XSD, XML and Python code

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    I am trying to access one of the element from complex type and running into 'AttributeError: '_PluralBinding' object has no attribute' Attaching the XSD, XML and Python code

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    I am trying to access one of the element from complex type and running into 'AttributeError: '_PluralBinding' object has no attribute' Attaching the XSD, XML and Python code

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    It works !!! Thanks a lot.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Your document needs to be: <ns1:datapackage xmlns:ns1="urn:datapackageNS"> <ns1:timestamp>123.3</ns1:timestamp> <ns1:type>type</ns1:type> <ns1:host>host</ns1:host> </ns1:datapackage> The namespace declaration attribute doesn't automatically apply to the name of the tag it's in.

  • Saurabh Jain Saurabh Jain modified a comment on discussion Help

    Hi Peter, I am facing similar issue however it happens when I start using Namespace. Attaching the XSD, XML and python code. TIA Saurabh XSD <xsd:schema xmlns:cmt="urn:datapackageNS" elementformdefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeformdefault="unqualified" targetnamespace="urn:datapackageNS"></xsd:schema> <xsd:element name="DataPackage"> <xsd:complextype> <xsd:sequence> <xsd:element default="0.0" type="xsd:float" name="timestamp"> <xsd:element default="None" type="xsd:string"...

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    Forgot to mention that I tried without namespace and thing worked fine.

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    Forgot to mention that I tried without namespace and thing worked fine.

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    Forgot to mention that I tried without namespace and thing worked fine.

  • Saurabh Jain Saurabh Jain posted a comment on discussion Help

    Hi Peter, I am facing similar issue however it happens when I start using Namespace. Attaching the XSD, XML and python code. TIA Saurabh XSD <xsd:schema xmlns:cmt="urn:datapackageNS" elementformdefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeformdefault="unqualified" targetnamespace="urn:datapackageNS"></xsd:schema> <xsd:element name="DataPackage"> <xsd:complextype> <xsd:sequence> <xsd:element default="0.0" type="xsd:float" name="timestamp"> <xsd:element default="None" type="xsd:string"...

  • Moo Nam Ko Moo Nam Ko posted a comment on discussion Help

    Hello Peter, Thank you so much! It works. Now, I understand how to handles the unbounded number of elements. Thank you for your great help and time again!!!

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    The schema shows there are an unbounded number of Gender elements within the containing GenderDetails element; i.e. Gender is plural, as I originally suggested. So you probably need person.GenderDetails.Gender[0].GenderValue.

  • Moo Nam Ko Moo Nam Ko posted a comment on discussion Help

    GenderValue part of the schema is <xs:element name="Person"> <xs:complexType> <xs:sequence> <xs:element ref="GenderDetails" minOccurs="0"/> <xs:element ref="ActiveStatusDetails" minOccurs="0"/> <xs:element ref="DeceasedDetails" minOccurs="0"/> <xs:element ref="PersonNameDetails" minOccurs="0"/> <xs:element ref="Descriptions"/> <xs:element ref="DateDetails" minOccurs="0"/> <xs:element ref="BirthPlaceDetails" minOccurs="0"/> <xs:element ref="SanctionsReferences" minOccurs="0"/> <xs:element ref="AddressDetails"...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    If the schema shows GenderValue as a non-plural element within whatever type Gender is the code you show should work. Without seeing the schema I can't tell. The _PluralBinding material is internal to PyXB; some of its visible markers are described here.

  • Moo Nam Ko Moo Nam Ko posted a comment on discussion Help

    Hello Peter, Thank you for reply. I reivsed the code using code tag. I first time use the sourceforge, so I did the mistake when I posted the code. I hope the revised one is much better to read. I validated the the xml file using xsd, so the xml file is ok with the schema. The max occurance is 1. I have two questions. Is my code the rigth way to access the grandchild elemenet if the xml and xsd are correct? Is there other way to access it? person.GenderDetails.Gender.GenderValue Could you explain...

  • Moo Nam Ko Moo Nam Ko modified a comment on discussion Help

    My service provider gave me data using XML and XSD files and I'm trying to parse this data using PYXB library in Python. I can access the root and child elements and attributes except for the grandchild element. I'd like to know how I can access the value of grandchild element(GenderValue). Here is a part of xml file: <Person id="10441" recordaction="add" date="10-Jul-2018"> <GenderDetails> <Gender> <ReferenceGroup ReferenceGroupCode="DJ"/> <GenderValue>Male</GenderValue> </Gender> </GenderDetails>...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    A couple things are odd. First, you're referencing GenderDetails but the XML has it spelled genderdetails. Probably one or the other is not what's actually being used. The bigger clue is the reference to PluralBinding which suggests that the Gender element can appear multiple times (which is also a little odd), in which case it's like a list/array and you have to pick which of the elements you want to look at. Or you're spelling the element name wrong. At any rate there isn't enough context here...

  • Moo Nam Ko Moo Nam Ko modified a comment on discussion Help

    My service provider gave me data using XML and XSD files and I'm trying to parse this data using PYXB library in Python. I can access the root and child elements and attributes except for the grandchild element. I'd like to know how I can access the value of grandchild element(GenderValue). Here is a part of xml file: <person date="10-Jul-2018" recordaction="add" id="10441"> <genderdetails> <gender> <referencegroup referencegroupcode="DJ"> <gendervalue>Male</gendervalue> </referencegroup></gender>...

  • Moo Nam Ko Moo Nam Ko posted a comment on discussion Help

    My service provider gave me data using XML and XSD files and I'm trying to parse this data using PYXB library in Python. I can access the root and child elements and attributes except for the grandchild element. I'd like to know how I can access the value of grandchild element(GenderValue). Here is a part of xml file: <person date="10-Jul-2018" recordaction="add" id="10441"> <genderdetails> <gender> <referencegroup referencegroupcode="DJ"> <gendervalue>Male</gendervalue> </referencegroup></gender>...

  • Jakobi Pascal Jakobi Pascal posted a comment on discussion Help

    Thanks. Will give a try today.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB 1.2.4 is almost four years old. The command you provided runs without error on the development version of PyXB, which has minimal changes from 1.2.6 which is the current release. Please update; if you have problems with 1.2.6 please open an issue on github.

  • Jakobi Pascal Jakobi Pascal posted a comment on discussion Help

    Apologies if this has been answered already.... I installed pyxb on Centos 7 : python -V: Python 2.7.5 rpm -q PyXB : PyXB-1.2.4-2.el7.noarch I then ran the following command : pyxbgen -u http://www.xmlspif.org/schema/xmlspif.xsd -m xmlspif to generate binding classes. Unfortunately it creates a module that refers to some 'text_type' variable that does not exists. In CreateFromDocument() I can see a line such as if isinstance(xmld, _six.text_type): ..... This is probably my mistake ... but I cannot...

  • FJ Collins FJ Collins posted a comment on discussion Help

    Thank you for the quick respone - I have posted a new issue there.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Support for PyXB is handled on github. Please open an issue there, describing what you want to accomplish and attaching your (minimized) schema and an example (minimized) program showing that it doesn't do what you expect. The problem should be reproducible with a schema that has at most a single element with a simple type with the defaults.

  • FJ Collins FJ Collins posted a comment on discussion Help

    Hello, I have an XSD schema where I have set some default boolean values and I was wondering if it is possible that PyxB would honor those default values on instantiation of Python objects or if not, how I would get that functionality. I was hoping not having to manually set up the default values. I can share the schema if needed - I am under the impression that I am not using something in the generated bindings class to the fullest extent so any assistance would be appreciated. Thanks!

  • VICKY VICKY posted a comment on discussion Help

    I have a schema generated from a .xsd file . i want to add elemnt to a type which is not defined in schema .

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I'm not getting enough information to tell what the problem is, probably because it depends on your schema. Take the test-issue-0014 example which is self-contained, and change it incrementally until it does what you're trying to do. That should either reveal the problem, or at least provide something you can provide in an issue on github where I could see exactly what's going on.

  • Lavanya Lavanya posted a comment on discussion Help

    I am getting empty tag like : <ns2:Extensions/>. But in the object I can see the tag name and value being added.

  • Lavanya Lavanya posted a comment on discussion Help

    Yeah tried that too! But not working

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I think you'd want to do: reg.Extensions._appendWildcardElement(name) to match what the example does.

  • Lavanya Lavanya posted a comment on discussion Help

    Hi Peter, Thank you for the reply. I tried something like this : # Construct a DOM element for tag e2 in the ns2 namespace and give it some content. bds = pyxb.utils.domutils.BindingDOMSupport() name = bds.createChildElement(ns2.createExpandedName('name')) bds.appendTextChild("dummy", name) reg.Extensions = pyxb.BIND() reg.Extensions._complexTypeDefinition__wildcardElements.append(name) When I did reg.Extensions.wildcardElements()[0].toprettyxml() I can print the XML content. But it is not printing...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I think you're adding the class pyxb.utils.saxdom.Element, rather than an instance of a DOM element. So what's there isn't recognized by PyXB. test-issue-0014 has an example of what you're trying to do. See that test case for full context, but you'll want something like this: # Create a namespace and tell PyXB what to call it in generated documents ns2 = pyxb.namespace.Namespace("urn:issue14.2") pyxb.utils.domutils.BindingDOMSupport.DeclareNamespace(ns2, 'n2') # Construct a DOM element for tag e2...

  • Lavanya Lavanya posted a comment on discussion Help

    Hi All, I am trying to add userdefined tags to my schema. The schema is defined as I can add any element to a particular node.: <xs:element name="Extensions"> <xs:annotation> <xs:documentation>Container for specific extensions.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:any namespace="##any" processContents="lax" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Accepts any element(s) the content provider wants to put here.</xs:documentation> </xs:annotation> </xs:any>...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    There's not enough detail on what you're doing. If you open an issue on github that reproduces the problem with a simple schema I may be able to assist. However, unless the documents generated by PyXB violate the schema, changes to order of element and content is not a bug: order can only be preserved if order is enforced by the schema.

  • Lavanya Lavanya posted a comment on discussion Help

    I set the following values and tried to generate. It still does not preserve the order pyxb.ValidationConfig()._setForDocument(False) pyxb.ValidationConfig()._setForBinding(False)

  • Lavanya Lavanya posted a comment on discussion Help

    Hi Peter Thank you for the reply. How do I identify that its a mixed content? Also, I used the following commnds pyxb.ValidationConfig()._setContentInfluencesGeneration(pyxb.ValidationConfig.NEVER) pyxb.binding.basis._TypeBinding_mixin()._setValidationConfig(pyxb.ValidationConfig.NEVER) I still could not preseve the order. Can you please help me to which method I should use.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    It may be that the order you are adding them is not consistent with the order required by the schema, or the schema does not require a specific order, or you may be using mixed content. See this section of the manual and the use of pyxb.ValidationConfig.

  • Lavanya Lavanya posted a comment on discussion Help

    Hi All, I am trying to generate XML file using PYXB library. THe order in which the elements are generated is not same as The orderI am adding them. It is not same even after multiple generations. Can anyone please suggest how to preserve the order. Thanks in advance.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Open Discussion

    This forum will no longer be monitored. Please see: https://github.com/pabigot/pyxb/issues/100

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    This forum will no longer be monitored. Please see: https://github.com/pabigot/pyxb/issues/100

  • André Cruz André Cruz posted a comment on discussion Help

    Hello. I'm trying to create a SAML request using PyXB and was wondering how I could add extension elements and sign the resulting request. This is what I'm trying to reproduce: <?xml version="1.0" encoding="UTF-8"?> <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://www.portaldocidadao.pt/" Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" Destination="https://autenticacao.gov.pt/Default.aspx" ID="_5189edad-7a61-4b6f-b686-f0cee0852eb0"...

  • Tejas Iyer Tejas Iyer posted a comment on discussion Help

    Hi I have a schema : But when I try to Bind it gives me error on Type Aircraft: tgfMessage.append(Aircraft) File "/usr/lib/python2.7/dist-packages/pyxb/binding/basis.py", line 2534, in append raise pyxb.UnrecognizedContentError(self, self.__automatonConfiguration, value, location) pyxb.exceptions_.UnrecognizedContentError: Invalid content <pyxb.BIND object at 0x7f7189924a90> (expect Aircraft) Code: msgType = tgfAircraftMessage.MsgType.Aircraft tgfMessage = tgfAircraftMessage.TgfAircraftMessage()...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    This could probably be done with introspection of the bindings module. Walk it to identify top-level members that subclass pyxb.binding.basis._TypeBinding_mixin, then search for how they appear within other members. For example, class CTD_ANON_5 is added as the type of an element named list in a parent class WebAppList, which itself appears at the type of an element webApps in WasScanTarget. Look in the bindings for things like what's below. WebAppList._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None,...

  • jacob betz jacob betz modified a comment on discussion Help

    Is there a easy way to match the anonymous (CTD_ANON* and STD_ANON*) to the parent elements? Here's the schema I'm using: https://qualysapi.qualys.com/qps/xsd/3.0/was/wasscanschedule.xsd As an example for this hierarchy, it seems like lots of hunting to construct a ServiceRequest (approximately like this): ServiceRequest CTD_ANON ServiceRequestFilters Criteria STD_ANON ServiceRequestPreferences ... ... I'm using PyCharm and the code completion isn't helpful for anything below the ServiceRequest....

  • jacob betz jacob betz modified a comment on discussion Help

    Is there a easy way to match the anonymous (CTD_ANON and STD_ANON) to the parent elements? Here's the schema I'm using: https://qualysapi.qualys.com/qps/xsd/3.0/was/wasscanschedule.xsd As an example for this hierarchy, it seems like lots of hunting to construct a ServiceRequest (approximately like this): ServiceRequest CTD_ANON ServiceRequestFilters Criteria STD_ANON ServiceRequestPreferences ... ... I'm using PyCharm and the code completion isn't helpful for anything below the ServiceRequest. Is...

  • jacob betz jacob betz posted a comment on discussion Help

    Is there a easy way to match the anonymous (CTD_ANON and STD_ANON) to the parent elements? Here's the schema I'm using: https://qualysapi.qualys.com/qps/xsd/3.0/was/wasscanschedule.xsd As an example for this hierarchy, it seems like lots of hunting to construct a ServiceRequest (approximately like this): ServiceRequest CTD_ANON ServiceRequestFilters Criteria STD_ANON ServiceRequestPreferences ... ... I'm using PyCharm and the code completion isn't helpful for anything below the ServiceRequest. Is...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB is concerned with validation, and the schema does not enforce an order. What support is provided was intended primarily for preserving order when processing existing documents, and your need to build them up manually may not be supported. For example, using this schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="SCn"> <xs:complexType> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="a" type="xs:integer"/>...

  • Fabrice Salvaire Fabrice Salvaire posted a comment on discussion Help

    Hi, MusicXML defines <xs:group name="music-data"> <xs:annotation> <xs:documentation>The music-data group contains the basic musical data that is either associated with a part or a measure, depending on whether the partwise or timewise hierarchy is used.</xs:documentation> </xs:annotation> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="note" type="note"/> <xs:element name="backup" type="backup"/> <xs:element name="forward" type="forward"/> <xs:element name="direction"...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Read this page of the manual. You need to generate the bindings for the imported schema first, then generate the bindings for all schema files that define the content of your namespace simutaneously and referencing the bindings for the imported schema. This could be done by generating with schema the includes both command and reply or doing something like: pyxbgen \ -u command.xsd -m command \ -u reply.xsd -m reply \ --archive-path .:+

  • Sanjay Maurya Sanjay Maurya posted a comment on discussion Help

    Hi, I have two schema command.xsd and reply.xsd , both of them importing three other schema internally. I am able to successfully generate python module out of these schema but when I import these module in my python program I got following error: NamespaceUniquenessError: urn:epcglobal:xsd:1: name Document used for multiple values in typeBinding P.S:- command.xsd and reply.xsd are using same name space. How solve this problem

  • Raymond L Yacht Raymond L Yacht posted a comment on discussion Help

    Thanks, I'll look at the customization api!

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Rather than setting an attribute on the class, I would use the full customization api to add capabilities through a subclass, even if you're just adding helpers that don't need to affect XML parsing or generation. But it'd probably work the way you're using it. I think m.abc.typeDefinition() would produce a reference to the binding class for the type of element m.abc.

  • Raymond L Yacht Raymond L Yacht posted a comment on discussion Help

    Suppose I have a schema m.xsd and I use it to generate m.py. m provides a complexType abc, and so in code I can write x = m.abc() Now I would like to add a method named splunge so that I can call it like this s = x.splunge() The only thing I can come up with (described below) is clearly not the right approach: I can do this if I generate with --write-for-customization and then put something like this in the top level generated file, import raw.something as m def splunge(self): return "splunge!" setattr(...

  • reet reet posted a comment on discussion Help

    Ok, thanks for your help!

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    To be more clear, comments are not part of the PyXB binding data model, so you can't put a comment into a binding object and have it expressed as a comment when the object is converted to XML.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    BindingDOMSupport is special interface used only to affect how PyXB binding objects are converted to or from DOM instances. Once you have the DOM instance you need to use the xml.dom API to manipulate it. You probably need something like: dom.root.appendChild(dom.createComment('My comment'));

  • reet reet posted a comment on discussion Help

    Thanks for your answer. I want to add an XML comment while constructing the XML via binding python objects, e.g. if an error occurs I want to place the XML comment instead of the element in the non-error case: <element> <!-- ERROR: out of range <subelt>-123123133</subelt> --> mixed content </element> How can I achieve this with toDOM? I tried: el = ... python object from pyxbgen code .. bds = pyxb.utils.domutils.BindingDOMSupport() dom = el.toDOM(element_name="element") bds.appendTextChild('<!--...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    What do you mean by "comment", and how are you adding it? If you have: <element> <subelt>3</subelt> mixed content </element> are you looking to add a real XML comment: <element> <!-- subelt is optional --> <subelt>3</subelt> mixed content </element> or more text, or something else? If you want to add an XML comment then you'll need to convert the PyXB binding object to DOM and operate on the DOM structure. Use obj.toDOM(). If you want to add something to the PyXB binding object whatever you add has...

  • reet reet posted a comment on discussion Help

    Hi, First of all, thanks for pyxb! We use it with great success in our project. Now let me describe the problem. We generate a binding from a complex schema, fill in the data and write the resulting XML. Works great. Now I'd like to add a comment to an arbitrary location in the document. I was not able to find out how to achieve this. If I append a text to an element without creating a schema object first, the text is still inserted as element. Any help is appreciated how to achieve this. Kind r...

  • PyXB: Python XML Schema Bindings PyXB: Python XML Schema Bindings released /pyxb/1.2.6/PyXB-1.2.6.tar.gz.asc

  • PyXB: Python XML Schema Bindings PyXB: Python XML Schema Bindings released /pyxb/1.2.6/PyXB-1.2.6.tar.gz

  • PyXB: Python XML Schema Bindings PyXB: Python XML Schema Bindings released /pyxb/1.2.6/PyXB-1.2.6.zip.asc

  • PyXB: Python XML Schema Bindings PyXB: Python XML Schema Bindings released /pyxb/1.2.6/notice-1.2.6.txt

  • PyXB: Python XML Schema Bindings PyXB: Python XML Schema Bindings released /pyxb/1.2.6/PyXB-1.2.6.zip

  • Peter A. Bigot Peter A. Bigot committed [f2f091]

    Archive release 1.2.6

  • Peter A. Bigot Peter A. Bigot committed [41a9ab]

    Refine release process

  • Peter A. Bigot committed [a352e4]

    structures: discard particles with maxOccurs="0"

  • Peter A. Bigot committed [cde448]

    reqif: add bundle

  • Peter A. Bigot committed [2f2d18]

    examples passim: update test infrastructure

  • Peter A. Bigot committed [d64140]

    doc: update for release

  • Peter A. Bigot committed [dc037f]

    examples/weather: disable test

  • Peter A. Bigot committed [21b987]

    xs.duration: correct handling of large durations measured in seconds

  • Peter A. Bigot committed [e31437]

    doc: replace epydoc with sphinx plus sphinx-epytext

  • Peter A. Bigot committed [6e3151]

    docs: remove unreferenced file

  • Peter A. Bigot committed [320249]

    doc/Makefile: strip gratuitous trailing newline from generated file

  • Peter A. Bigot committed [11017b]

    test/support.sh: add file

  • Peter A. Bigot committed [fe4ba1]

    structures: mark restriction declarations that supersede parent scope

  • Peter A. Bigot committed [92db87]

    test/trac-0193: correct test

  • Peter A. Bigot committed [1816ce]

    examples/manual: remove non-reference output files

  • Peter A. Bigot committed [22df42]

    examples/manual: disable test for demo4c

  • Peter A. Bigot committed [846f26]

    Namespace: disallow setting prefix to empty string

  • Peter A. Bigot committed [7aff70]

    datatypes: fix copy/pickle issue with dateTime classes

  • Peter A. Bigot committed [01b9bc]

    examples: correct reference to fail function

  • Peter A. Bigot committed [8a5e8a]

    structures: fix diagnostic for minidom parser

  • Peter A. Bigot committed [73ff23]

    examples/unicode_jp: document unidecode as a potential solution

  • Peter A. Bigot committed [0dfd10]

    binding/datatypes: detect empty xml construction of scalar values

  • Peter A. Bigot committed [b20fe6]

    structures: remove mis-use of derivation method as indicating resolution

  • Peter A. Bigot committed [c6db5e]

    tests: update for python3

  • Peter A. Bigot committed [4d573f]

    Version number updated for release 1.2.6

1 >