Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Omitting a field in XML
Message
From
01/10/2007 03:53:06
 
 
To
30/09/2007 12:55:12
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Internet
Category:
XML
Miscellaneous
Thread ID:
01257516
Message ID:
01257669
Views:
19
Can you post the schema with minOccurs (and maybe a sample XML)?

>I've tried that already but it doesn't seem to work correctly.
>
>>minOccurs=0 ?
>>
>>>I have the following schema:
>>>
>>>
>>><?xml version="1.0" encoding="UTF-8"?>
>>><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>>	<xs:element name="PRSDIE">
>>>		<xs:complexType>
>>>			<xs:sequence>
>>>				<xs:element ref="D_NUMBER"/>
>>>				<xs:element ref="D_SIZE"/>
>>>				<xs:element ref="D_NUM_PORTS"/>
>>>				<xs:element ref="D_PORT_TYPE"/>
>>>				<xs:element ref="D_DESC"/>
>>>				<xs:element ref="D_LOCATION"/>
>>>			</xs:sequence>
>>>		</xs:complexType>
>>>	</xs:element>
>>>	<xs:element name="D_SIZE" type="xs:string"/>
>>>	<xs:element name="D_PORT_TYPE" type="xs:string"/>
>>>	<xs:element name="D_NUM_PORTS" type="xs:integer"/>
>>>	<xs:element name="D_NUMBER" type="xs:string"/>
>>>	<xs:element name="D_LOCATION" type="xs:string"/>
>>>	<xs:element name="D_DESC" type="xs:string"/>
>>>	<xs:element name="CAPCO1">
>>>		<xs:complexType>
>>>			<xs:sequence>
>>>				<xs:element ref="PRSDIE" maxOccurs="unbounded"/>
>>>			</xs:sequence>
>>>		</xs:complexType>
>>>	</xs:element>
>>></xs:schema>
>>>
>>>
>>>I need to change it so all fields are optional, and the tags don't even need to exist in the file. Now if I omit the tags themselves I get an error when I import into a .NET dataset. Any advice out there?
Previous
Reply
Map
View

Click here to load this message in the networking platform