473,407 Members | 2,314 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,407 software developers and data experts.

Howto : Add XmlSchemaElement to XmlSchemaComplexType

Hello,

I am generating an XML schema for the use in Biztalk 2004. Everything
works, except for one simple thing.
I cannot add XmlSchemaElements to a XmlSchemaComplexType. This is necessary
for the use of subrecords (nested elements, like the SubRecord1 element in
the example below).

I can add attributes to the complextype, but I don't succeed in adding
elements to this.
Attributes : __________
Dim complex As New XmlSchemaComplexType
Dim child As New XmlSchemaAttribute
complex.Attributes.Add(child)
Elements : __________
Dim complex As New XmlSchemaComplexType
Dim child As New XmlSchemaElement
//What do I have to do here??

Example : ___________
<Root>
<Record1 Attribute1="t">
<SubRecord1>test</SubRecord1>
</Record1>
</Root>
Nov 12 '05 #1
1 3336


Sam Vanhoutte wrote:

I am generating an XML schema for the use in Biztalk 2004. Everything
works, except for one simple thing.
I cannot add XmlSchemaElements to a XmlSchemaComplexType. This is necessary
for the use of subrecords (nested elements, like the SubRecord1 element in
the example below).

I can add attributes to the complextype, but I don't succeed in adding
elements to this.
Attributes : __________
Dim complex As New XmlSchemaComplexType
Dim child As New XmlSchemaAttribute
complex.Attributes.Add(child)
Elements : __________
Dim complex As New XmlSchemaComplexType
Dim child As New XmlSchemaElement
//What do I have to do here??

Example : ___________
<Root>
<Record1 Attribute1="t">
<SubRecord1>test</SubRecord1>
</Record1>
</Root>


You would need something alike
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:element name="Record1">
<xs:complexType>
<xs:sequence>
<xs:element name="SubRecord1" />
</xs:sequence>
<xs:attribute name="Attribute1" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

so a xs:complexType element doesn't contain an xs:element element as a
child but an xs:sequence (or a group)
--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #2

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

Similar topics

4
by: Josef Sachs | last post by:
Is Andrew Kuchling's regex-to-re HOWTO available anywhere? I've found the following (dead) links on various Web pages: http://py-howto.sourceforge.net/regex-to-re/regex-to-re.html...
2
by: eXavier | last post by:
Hi all, I wrote some generator of classes from XSD files but encountred unexpected (for me) values in parsed DOM. First I load XSD with XmlSchema.Read() method, then iterate through...
0
by: Rein Petersen | last post by:
Hi Folks, I'm reading a schema using SOM (System.Xml.Schema) and there are namespaced attributes that I need to access but I'm having problems with the UnhandledAttributes property - that is is...
1
by: Rein Petersen | last post by:
Somebody please tell me what is the matter with the System.Xml.Schema.XmlSchemaElement.UnhandledAttributes property. I don't seem to be able to access no matter how I try... Rein
1
by: Christian Lammel | last post by:
OK, repost: > I implemented a schema helper function GetDeclaration (similar to MSXML), > that finds a XmlSchemaElement for a given XmlElement, using a > XmlSchemaCollection. There is one kind...
1
by: Josh | last post by:
Is there anyway to get the correct XmlSchemaElement from an XSD that corresponds to an element within an Xml Document Instance? I want to automatically generate a UI for an Xml Instance based...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
4
by: Marco Meoni | last post by:
Hi. I read the Gordon McMillan's "Socket Programming Howto". I tried to use the example in this howto but this doesn't work. The code is class mysocket: '''classe solamente dimostrativa -...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.