I am getting empty tag like : <ns2:Extensions/>. But in the object I can see the tag name and value being added.
Yeah tried that too! But not working
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...
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>...
I set the following values and tried to generate. It still does not preserve the order pyxb.ValidationConfig()._setForDocument(False) pyxb.ValidationConfig()._setForBinding(False)
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.
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.