473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XSD.Exe ignoring certain elements

For the following XSD:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="E1" type="CT1"/>
<xs:complexType name="CT1">
<xs:sequence>
<xs:element name="CT1_E1"
type="xs:string"/>
<xs:choice>
<xs:sequence>
<xs:element
name="CT1_E2" type="xs:string"/>
<xs:element
name="CT1_E3" type="xs:string"/>
</xs:sequence>
<xs:group ref="G1"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:group name="G1">
<xs:choice>
<xs:element name="G1_E1"
type="xs:string"/>
<xs:element name="G1_E2"
type="xs:string"/>
</xs:choice>
</xs:group>
</xs:schema>

XSD.Exe generated the following code:

using System.Xml.Serialization;

[System.Xml.Serialization.XmlRootAttribute("E1",
Namespace="", IsNullable=false)]
public class CT1 {
public string CT1_E1;

[System.Xml.Serialization.XmlElementAttribute
("CT1_E3", typeof(string))]
[System.Xml.Serialization.XmlElementAttribute
("CT1_E2", typeof(string))]
[System.Xml.Serialization.XmlChoiceIdentifierAttrib ute
("ItemElementName")]
public string Item;

[System.Xml.Serialization.XmlIgnoreAttribute()]
public ItemChoiceType ItemElementName;
}

[System.Xml.Serialization.XmlTypeAttribute
(IncludeInSchema=false)]
public enum ItemChoiceType
{
CT1_E3,
CT1_E2,
}

I don't see any reference to the group <G1> or its
elements <G1_E1> and <G1_E2>. How am I supposed to work
with <G1_E1> and <G1_E2>?

Any help would be greatly appreciated.
Nov 12 '05 #1
0 1290

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: SAN CAZIANO | last post by:
i have to do in the onkeypress or in onchange the float (real) field validation I try something: function ValidaCampo(nomeCampo,TotInteri,TotDecimali) {...
10
by: lac | last post by:
Hello all, I am trying to make horizontal bars of different lengths. I tought either SPAN or DIV would work but it only works for IE. I have a small example at: http://sedivy.com/test.htm Let...
2
by: arne | last post by:
Hi what would be the easiest way to find all tag's with a certain name (or class) below (within) a certain tag. Pref jscript DOM thx Arne
3
by: Jody Greening | last post by:
How do I write a schema that is only validating elements: 1,4,7,8,9 and ignores every other element? I also need to not to care about the order of the elements or how many are in between...
0
by: Ryan B | last post by:
Hi there, I've been searching the posts in this group and haven't been able to find anything that suitably solves my problem.. anyway... I am attempting to deserialize a class which I do not...
5
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
0
by: Tim Daneliuk | last post by:
I am having trouble getting tkinter to recognize the following key presses- it seems to be ignoring them alltogether: Alt F1-F10: FreeBSD 4.x console running XFree86 and cygwin/X (current)...
4
by: Joshua Mostafa | last post by:
Hi there. I have a question regarding restrictions in an XML Schema definition. My XML contains a structure like this: <fruit-bowl> <fruit name="apple" /> <fruit name="pear" /> <fruit...
9
by: jufemaiz: jc | last post by:
Is there any information out there on ignoring the desktop oriented conventions of ASP.NET and developing web app's more in line with traditional web app development. I need far more control over...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.