GouthamAnand
asked on
How to send blank for integer / long in XML ?
Hi
Below is my element in XSD. In 'ParentSDSID' I want to send blank. Just <ParentSDSID></ParentSDSID > and it can be long.
how to form the xsd? I tried nillable="true", but is it not accepting.
Can anyone suggest me please?
<xs:element type="xs:long" nillable="true" name="ParentSDSID"/>
Below is my element in XSD. In 'ParentSDSID' I want to send blank. Just <ParentSDSID></ParentSDSID
how to form the xsd? I tried nillable="true", but is it not accepting.
Can anyone suggest me please?
<xs:element type="xs:long" nillable="true" name="ParentSDSID"/>
Here is what I would do
<xs:element type="long-and-null" name="ParentSDSID"/>
<xs:simpleType name="long-and-null">
<xs:union memberTypes="stp-long stp-empty"/>
</xs:simpleType>
<xs:simpleType name="stp-long">
<xs:restriction base="xs:long"/>
</xs:simpleType>
<xs:simpleType name="stp-empty">
<xs:restriction base="xs:string">
<xs:maxLength value="0"/>
</xs:restriction>
</xs:simpleType>
ASKER
Hi
Attached is my schema. Could you please update it ?
I am confused with your xsd structure.
XYZRequestSchema.xsd
Attached is my schema. Could you please update it ?
I am confused with your xsd structure.
XYZRequestSchema.xsd
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot.
welcome
because then you need to explicitely set the xsi:nil attribute to make it work
is that acceptable?
<ParentSDSID xsi:nil="true"></ParentSDS