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.
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>...
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>...
Need some help here on how to assign value to abstract type.
I think there is some issue with schema the way abstract is used, working on fixing it.
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...
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
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
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
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
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
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
It works !!! Thanks a lot.
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"...
Forgot to mention that I tried without namespace and thing worked fine.
Forgot to mention that I tried without namespace and thing worked fine.
Forgot to mention that I tried without namespace and thing worked fine.
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"...