[xsd-users] Looking for some serializing examples with ##other
Badari Prasad
badari.hp at gmail.com
Mon Jun 29 05:13:10 EDT 2020
Hi ,
I need to serialize a xml , where XSD contains ##other and I need to
add another xml defined by an XSD into this xml any.
<xs:complexType name="MediationDetailsExtensions">
<xs:complexContent>
<xs:extension base="Extension"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Extension">
<xs:sequence>
<xs:element name="Owner" type="xs:string"/>
<xs:any *namespace="##other"* minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
xml any needs to be replaced with *X1Extensions*.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:3GPP:ns:li:3GPPX1Extensions"
targetNamespace="urn:3GPP:ns:li:3GPPX1Extensions"
elementFormDefault="qualified">
<xs:complexType name="X1Extensions">
<xs:sequence>
<xs:element name="Extension" type="X1Extension" minOccurs="1"
maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="X1Extension">
<xs:choice>
<xs:element name="HeaderReporting"
type="PDHRReportingExtensions"></xs:element>
<xs:element name="ServiceScopingOptions"
type="ServiceScopingOptions"></xs:element>
</xs:choice>
</xs:complexType>
I did go through examples
in xsd-4.0.0-x86_64-linux-gnu/examples/cxx/tree/order/element/, but could
not figure out the right way to add xml data into xml any.
Can you kindly provide me with some more info and examples.
Thanks
Badari
More information about the xsd-users
mailing list